home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1994-10-25 | 21.1 KB | [TEXT/MPS ] |
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
You can browse this item here: dateTime.π.text
Confidence | Program | Detection | Match Type | Support
|
---|
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Tue Oct 25 08:08:39 1994, modified Tue Oct 25 08:08:39 1994, creator 'MPS ', type ASCII, 21096 bytes "dateTime.�.text" , at 0x52e8 286 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
50%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [MPS ] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0f 64 61 74 65 54 69 | 6d 65 2e b9 2e 74 65 78 |..dateTi|me...tex|
|00000010| 74 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |t.......|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 01 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 00 52 68 00 | 00 01 1e aa d2 a5 c7 aa |.....Rh.|........|
|00000060| d2 a5 c7 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 e4 35 00 00 |........|.....5..|
|00000080| 44 45 46 43 4f 4e 53 54 | 28 27 6b 44 61 74 65 46 |DEFCONST|('kDateF|
|00000090| 6f 72 6d 61 74 2c 47 65 | 74 44 61 74 65 53 74 72 |ormat,Ge|tDateStr|
|000000a0| 69 6e 67 53 70 65 63 28 | 5b 0d 09 09 09 09 5b 6b |ingSpec(|[.....[k|
|000000b0| 45 6c 65 6d 65 6e 74 4d | 6f 6e 74 68 2c 20 6b 46 |ElementM|onth, kF|
|000000c0| 6f 72 6d 61 74 41 62 62 | 72 5d 2c 0d 20 20 20 20 |ormatAbb|r],. |
|000000d0| 20 20 20 20 5b 6b 45 6c | 65 6d 65 6e 74 59 65 61 | [kEl|ementYea|
|000000e0| 72 2c 20 20 6b 46 6f 72 | 6d 61 74 4c 6f 6e 67 5d |r, kFor|matLong]|
|000000f0| 2c 0d 09 09 09 09 5b 6b | 45 6c 65 6d 65 6e 74 44 |,.....[k|ElementD|
|00000100| 61 79 2c 20 6b 46 6f 72 | 6d 61 74 4c 6f 6e 67 5d |ay, kFor|matLong]|
|00000110| 5d 29 29 3b 0d 0d 2f 2f | 20 2d 2d 2d 2d 20 45 6e |]));..//| ---- En|
|00000120| 64 20 50 72 6f 6a 65 63 | 74 20 44 61 74 61 20 2d |d Projec|t Data -|
|00000130| 2d 2d 2d 0d 0d 0d 2f 2f | 20 2d 2d 2d 2d 20 46 69 |---...//| ---- Fi|
|00000140| 6c 65 20 74 65 73 74 2e | 74 20 2d 2d 2d 2d 0d 6d |le test.|t ----.m|
|00000150| 61 69 6e 20 3a 3d 0d 20 | 20 20 7b 74 69 74 6c 65 |ain :=. | {title|
|00000160| 3a 20 22 44 61 74 65 20 | 50 72 6f 74 6f 73 20 53 |: "Date |Protos S|
|00000170| 61 6d 70 6c 65 20 32 22 | 2c 0d 20 20 20 20 76 69 |ample 2"|,. vi|
|00000180| 65 77 42 6f 75 6e 64 73 | 3a 20 7b 6c 65 66 74 3a |ewBounds|: {left:|
|00000190| 20 30 2c 20 74 6f 70 3a | 20 32 35 2c 20 72 69 67 | 0, top:| 25, rig|
|000001a0| 68 74 3a 20 32 33 34 2c | 20 62 6f 74 74 6f 6d 3a |ht: 234,| bottom:|
|000001b0| 20 33 31 30 7d 2c 0d 20 | 20 20 20 76 69 65 77 46 | 310},. | viewF|
|000001c0| 6f 72 6d 61 74 3a 20 38 | 33 39 35 31 39 35 33 2c |ormat: 8|3951953,|
|000001d0| 0d 20 20 20 20 5f 70 72 | 6f 74 6f 3a 20 70 72 6f |. _pr|oto: pro|
|000001e0| 74 6f 41 70 70 2c 0d 20 | 20 20 20 64 65 62 75 67 |toApp,. | debug|
|000001f0| 3a 20 22 6d 61 69 6e 22 | 0d 20 20 20 7d 3b 0d 0d |: "main"|. };..|
|00000200| 5f 76 69 65 77 30 30 30 | 20 3a 3d 20 2f 2a 20 63 |_view000| := /* c|
|00000210| 68 69 6c 64 20 6f 66 20 | 6d 61 69 6e 20 2a 2f 0d |hild of |main */.|
|00000220| 20 20 20 7b 0d 20 20 20 | 20 74 65 78 74 3a 0d 20 | {. | text:. |
|00000230| 20 20 20 20 20 22 5c 75 | 30 30 41 39 5c 75 20 31 | "\u|00A9\u 1|
|00000240| 39 39 34 20 41 74 6f 6d | 69 63 20 53 6f 66 74 77 |994 Atom|ic Softw|
|00000250| 61 72 65 2e 20 20 41 6c | 6c 20 72 69 67 68 74 73 |are. Al|l rights|
|00000260| 20 72 65 73 65 72 76 65 | 64 2e 5c 6e 5c 6e 46 72 | reserve|d.\n\nFr|
|00000270| 65 65 20 74 6f 20 64 69 | 73 74 72 69 62 75 74 65 |ee to di|stribute|
|00000280| 20 61 6e 64 20 75 73 65 | 20 69 6e 20 79 6f 75 72 | and use| in your|
|00000290| 20 61 70 70 73 21 20 20 | 4a 75 73 74 20 6c 65 74 | apps! |Just let|
|000002a0| 20 6d 65 20 6b 6e 6f 77 | 20 79 6f 75 20 61 72 65 | me know| you are|
|000002b0| 20 75 73 69 6e 67 20 69 | 74 20 61 6e 64 20 69 66 | using i|t and if|
|000002c0| 20 79 6f 75 20 65 6e 68 | 61 6e 63 65 20 69 74 2e | you enh|ance it.|
|000002d0| 5c 6e 5c 6e 54 68 61 6e | 6b 73 5c 6e 20 20 20 41 |\n\nThan|ks\n A|
|000002e0| 6c 6c 61 6e 20 4d 61 72 | 63 75 73 5c 6e 5c 6e 43 |llan Mar|cus\n\nC|
|000002f0| 49 53 3a 20 37 36 36 36 | 36 2c 32 31 31 33 5c 6e |IS: 7666|6,2113\n|
|00000300| 41 70 70 6c 65 4c 69 6e | 6b 3a 20 61 6c 6c 61 6e |AppleLin|k: allan|
|00000310| 2e 6d 61 72 63 75 73 5c | 6e 65 57 6f 72 6c 64 2f |.marcus\|neWorld/|
|00000320| 4e 65 77 74 6f 6e 4d 61 | 69 6c 3a 20 61 6c 6c 61 |NewtonMa|il: alla|
|00000330| 6e 2e 6d 5c 6e 49 6e 74 | 65 72 4e 65 74 3a 20 61 |n.m\nInt|erNet: a|
|00000340| 6c 6c 61 6e 40 61 70 70 | 6c 65 2e 63 6f 6d 5c 6e |llan@app|le.com\n|
|00000350| 5c 6e 2a 20 54 68 69 73 | 20 69 73 20 61 20 6d 6f |\n* This| is a mo|
|00000360| 64 69 66 69 65 64 20 76 | 65 72 73 69 6f 6e 20 6f |dified v|ersion o|
|00000370| 66 20 41 6c 6c 61 6e 27 | 73 20 6f 72 69 67 69 6e |f Allan'|s origin|
|00000380| 61 6c 20 74 68 61 74 20 | 68 65 20 73 65 6e 74 20 |al that |he sent |
|00000390| 74 6f 20 6d 65 2e 20 53 | 65 65 20 74 68 65 20 72 |to me. S|ee the r|
|000003a0| 65 61 64 6d 65 20 66 6f | 72 20 74 68 65 20 63 68 |eadme fo|r the ch|
|000003b0| 61 6e 67 65 73 20 74 68 | 61 74 20 49 20 6d 61 64 |anges th|at I mad|
|000003c0| 65 20 74 6f 20 69 74 2e | 20 2d 20 48 61 72 64 79 |e to it.| - Hardy|
|000003d0| 20 4d 61 63 69 61 22 0d | 20 20 20 20 2c 0d 20 20 | Macia".| ,. |
|000003e0| 20 20 76 69 65 77 42 6f | 75 6e 64 73 3a 20 7b 6c | viewBo|unds: {l|
|000003f0| 65 66 74 3a 20 31 2c 20 | 74 6f 70 3a 20 31 34 2c |eft: 1, |top: 14,|
|00000400| 20 72 69 67 68 74 3a 20 | 32 33 37 2c 20 62 6f 74 | right: |237, bot|
|00000410| 74 6f 6d 3a 20 32 33 34 | 7d 2c 0d 20 20 20 20 76 |tom: 234|},. v|
|00000420| 69 65 77 4a 75 73 74 69 | 66 79 3a 20 30 2c 0d 20 |iewJusti|fy: 0,. |
|00000430| 20 20 20 5f 70 72 6f 74 | 6f 3a 20 70 72 6f 74 6f | _prot|o: proto|
|00000440| 53 74 61 74 69 63 54 65 | 78 74 0d 20 20 20 7d 3b |StaticTe|xt. };|
|00000450| 0d 0d 0d 0d 0d 2f 2f 20 | 2d 2d 2d 2d 20 46 69 6c |.....// |---- Fil|
|00000460| 65 20 70 72 6f 74 6f 44 | 61 74 65 54 69 6d 65 50 |e protoD|ateTimeP|
|00000470| 69 63 6b 65 72 20 2d 2d | 2d 2d 0d 0d 2f 2f 20 2d |icker --|--..// -|
|00000480| 2d 2d 2d 20 46 69 6c 65 | 20 70 72 6f 74 6f 46 6c |--- File| protoFl|
|00000490| 6f 61 74 44 72 61 67 4e | 47 6f 20 2d 2d 2d 2d 0d |oatDragN|Go ----.|
|000004a0| 5f 75 73 65 72 70 72 6f | 74 6f 30 30 30 20 3a 3d |_userpro|to000 :=|
|000004b0| 0d 20 20 20 7b 76 69 65 | 77 42 6f 75 6e 64 73 3a |. {vie|wBounds:|
|000004c0| 20 7b 6c 65 66 74 3a 20 | 30 2c 20 74 6f 70 3a 20 | {left: |0, top: |
|000004d0| 30 2c 20 72 69 67 68 74 | 3a 20 31 30 2c 20 62 6f |0, right|: 10, bo|
|000004e0| 74 74 6f 6d 3a 20 31 30 | 7d 2c 0d 20 20 20 20 76 |ttom: 10|},. v|
|000004f0| 69 65 77 46 6c 61 67 73 | 3a 20 35 37 36 2c 0d 20 |iewFlags|: 576,. |
|00000500| 20 20 20 76 69 65 77 43 | 6c 69 63 6b 53 63 72 69 | viewC|lickScri|
|00000510| 70 74 3a 0d 20 20 20 20 | 20 20 66 75 6e 63 28 75 |pt:. | func(u|
|00000520| 6e 69 74 29 0d 20 20 20 | 20 20 20 62 65 67 69 6e |nit). | begin|
|00000530| 0d 20 20 20 20 20 20 20 | 20 20 2f 2f 20 6f 6e 6c |. | // onl|
|00000540| 79 20 61 6c 6c 6f 77 20 | 61 20 64 72 61 67 20 74 |y allow |a drag t|
|00000550| 6f 20 6f 63 63 75 72 20 | 69 66 20 69 74 20 69 73 |o occur |if it is|
|00000560| 20 69 6e 0d 20 20 20 20 | 20 20 20 20 20 2f 2f 20 | in. | // |
|00000570| 74 68 65 20 6d 61 72 67 | 69 6e 20 6f 66 20 74 68 |the marg|in of th|
|00000580| 65 20 76 69 65 77 0d 20 | 20 20 20 20 20 0d 20 20 |e view. | . |
|00000590| 20 20 20 20 20 20 20 2f | 2f 20 4e 4f 54 45 2c 20 | /|/ NOTE, |
|000005a0| 61 6c 6c 20 63 6f 6f 72 | 69 64 6e 61 74 65 73 20 |all coor|idnates |
|000005b0| 61 72 65 20 69 6e 20 47 | 4c 4f 42 41 4c 20 73 70 |are in G|LOBAL sp|
|000005c0| 61 63 65 0d 20 20 20 20 | 20 20 20 0d 20 20 20 20 |ace. | . |
|000005d0| 20 20 20 20 20 2f 2f 20 | 6f 74 68 65 72 77 69 73 | // |otherwis|
|000005e0| 65 2c 20 70 61 73 73 20 | 63 6c 69 63 6b 73 20 74 |e, pass |clicks t|
|000005f0| 68 72 6f 75 67 68 20 74 | 6f 20 6d 79 20 63 68 69 |hrough t|o my chi|
|00000600| 6c 64 72 65 6e 0d 20 20 | 20 20 20 20 20 20 20 6c |ldren. | l|
|00000610| 6f 63 61 6c 20 78 20 3a | 3d 20 47 65 74 50 6f 69 |ocal x :|= GetPoi|
|00000620| 6e 74 28 66 69 72 73 74 | 58 2c 20 75 6e 69 74 29 |nt(first|X, unit)|
|00000630| 2c 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |,. | |
|00000640| 20 79 20 3a 3d 20 47 65 | 74 50 6f 69 6e 74 28 66 | y := Ge|tPoint(f|
|00000650| 69 72 73 74 59 2c 20 75 | 6e 69 74 29 2c 0d 20 20 |irstY, u|nit),. |
|00000660| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 62 6f 78 | | box|
|00000670| 20 3a 3d 20 62 61 73 65 | 3a 47 6c 6f 62 61 6c 42 | := base|:GlobalB|
|00000680| 6f 78 28 29 20 3b 0d 20 | 20 20 20 20 20 20 0d 20 |ox() ;. | . |
|00000690| 20 20 20 20 20 20 0d 20 | 20 20 20 20 20 20 20 20 | . | |
|000006a0| 69 66 20 20 28 79 20 2d | 20 62 6f 78 2e 74 6f 70 |if (y -| box.top|
|000006b0| 29 20 3c 20 31 30 0d 20 | 20 20 20 20 20 20 20 20 |) < 10. | |
|000006c0| 20 20 20 4f 52 20 20 20 | 28 62 6f 78 2e 62 6f 74 | OR |(box.bot|
|000006d0| 74 6f 6d 20 2d 20 79 29 | 20 3c 20 31 30 0d 20 20 |tom - y)| < 10. |
|000006e0| 20 20 20 20 20 20 20 20 | 20 20 4f 52 20 20 20 28 | | OR (|
|000006f0| 78 20 2d 20 62 6f 78 2e | 6c 65 66 74 29 20 3c 20 |x - box.|left) < |
|00000700| 31 30 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 4f |10. | O|
|00000710| 52 20 20 20 28 62 6f 78 | 2e 72 69 67 68 74 20 2d |R (box|.right -|
|00000720| 20 78 29 20 3c 20 31 30 | 20 74 68 65 6e 0d 20 20 | x) < 10| then. |
|00000730| 20 20 20 20 20 20 20 62 | 65 67 69 6e 0d 20 20 20 | b|egin. |
|00000740| 20 20 20 20 20 20 20 20 | 20 49 6e 6b 4f 66 66 28 | | InkOff(|
|00000750| 75 6e 69 74 29 3b 0d 20 | 20 20 20 20 20 20 20 20 |unit);. | |
|00000760| 20 20 20 62 61 73 65 3a | 44 72 61 67 28 75 6e 69 | base:|Drag(uni|
|00000770| 74 2c 20 6e 69 6c 29 3b | 0d 20 20 20 20 20 20 20 |t, nil);|. |
|00000780| 20 20 20 20 20 73 65 6c | 66 3a 44 69 72 74 79 28 | sel|f:Dirty(|
|00000790| 29 3b 2f 2f 20 74 6f 20 | 67 65 74 20 69 6e 6b 20 |);// to |get ink |
|000007a0| 64 72 6f 70 70 69 6e 67 | 20 75 70 0d 20 20 20 20 |dropping| up. |
|000007b0| 20 20 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 2f | . | /|
|000007c0| 2f 20 72 65 74 75 72 6e | 20 74 72 75 65 20 74 6f |/ return| true to|
|000007d0| 20 73 61 79 20 68 61 6e | 64 6c 65 64 20 74 68 65 | say han|dled the|
|000007e0| 20 63 6c 69 63 6b 0d 20 | 20 20 20 20 20 20 20 20 | click. | |
|000007f0| 20 20 20 74 72 75 65 3b | 0d 20 20 20 20 20 20 20 | true;|. |
|00000800| 20 20 65 6e 64 20 65 6c | 73 65 0d 20 20 20 20 20 | end el|se. |
|00000810| 20 20 20 20 20 20 20 2f | 2f 20 72 65 74 75 72 6e | /|/ return|
|00000820| 20 6e 69 6c 20 73 6f 20 | 6b 69 64 73 20 63 61 6e | nil so |kids can|
|00000830| 20 67 65 74 20 63 6c 69 | 63 6b 0d 20 20 20 20 20 | get cli|ck. |
|00000840| 20 20 20 20 20 20 20 6e | 69 6c 3b 0d 20 20 20 20 | n|il;. |
|00000850| 20 20 65 6e 64 2c 0d 20 | 20 20 20 64 65 63 6c 61 | end,. | decla|
|00000860| 72 65 53 65 6c 66 3a 20 | 27 62 61 73 65 2c 0d 20 |reSelf: |'base,. |
|00000870| 20 20 20 76 69 65 77 4a | 75 73 74 69 66 79 3a 20 | viewJ|ustify: |
|00000880| 38 30 2c 0d 20 20 20 20 | 5f 70 72 6f 74 6f 3a 20 |80,. |_proto: |
|00000890| 70 72 6f 74 6f 46 6c 6f | 61 74 4e 47 6f 0d 20 20 |protoFlo|atNGo. |
|000008a0| 20 7d 3b 0d 0d 0d 2f 2f | 20 2d 2d 2d 2d 20 42 61 | };...//| ---- Ba|
|000008b0| 63 6b 20 69 6e 20 46 69 | 6c 65 20 70 72 6f 74 6f |ck in Fi|le proto|
|000008c0| 44 61 74 65 54 69 6d 65 | 50 69 63 6b 65 72 20 2d |DateTime|Picker -|
|000008d0| 2d 2d 2d 0d 44 61 74 65 | 54 69 6d 65 56 69 65 77 |---.Date|TimeView|
|000008e0| 20 3a 3d 0d 20 20 20 7b | 76 69 65 77 46 6c 61 67 | :=. {|viewFlag|
|000008f0| 73 3a 20 35 37 36 2c 0d | 20 20 20 20 76 69 65 77 |s: 576,.| view|
|00000900| 42 6f 75 6e 64 73 3a 20 | 7b 6c 65 66 74 3a 20 30 |Bounds: |{left: 0|
|00000910| 2c 20 74 6f 70 3a 20 30 | 2c 20 72 69 67 68 74 3a |, top: 0|, right:|
|00000920| 20 32 32 34 2c 20 62 6f | 74 74 6f 6d 3a 20 31 34 | 224, bo|ttom: 14|
|00000930| 38 7d 2c 0d 20 20 20 20 | 4f 70 65 6e 4d 65 3a 0d |8},. |OpenMe:.|
|00000940| 20 20 20 20 20 20 66 75 | 6e 63 28 72 65 74 75 72 | fu|nc(retur|
|00000950| 6e 56 69 65 77 2c 20 6d | 79 44 61 74 65 2c 20 6d |nView, m|yDate, m|
|00000960| 79 54 69 74 6c 65 29 0d | 20 20 20 20 20 20 62 65 |yTitle).| be|
|00000970| 67 69 6e 0d 20 20 20 20 | 20 20 09 73 65 6c 66 2e |gin. | .self.|
|00000980| 76 69 65 77 54 6f 53 65 | 74 20 3a 3d 20 72 65 74 |viewToSe|t := ret|
|00000990| 75 72 6e 56 69 65 77 3b | 0d 20 20 20 20 20 20 09 |urnView;|. .|
|000009a0| 73 65 6c 66 2e 74 68 65 | 44 61 74 65 3a 3d 20 6d |self.the|Date:= m|
|000009b0| 79 44 61 74 65 3b 0d 20 | 20 20 20 20 20 09 73 65 |yDate;. | .se|
|000009c0| 6c 66 2e 74 68 65 54 69 | 74 6c 65 20 3a 3d 20 6d |lf.theTi|tle := m|
|000009d0| 79 54 69 74 6c 65 3b 0d | 20 20 20 20 20 20 09 73 |yTitle;.| .s|
|000009e0| 65 6c 66 3a 4f 70 65 6e | 28 29 3b 0d 20 20 20 20 |elf:Open|();. |
|000009f0| 20 20 2f 2f 09 70 72 69 | 6e 74 28 22 4f 70 65 6e | //.pri|nt("Open|
|00000a00| 20 6d 65 20 64 6f 6e 65 | 22 29 0d 20 20 20 20 20 | me done|"). |
|00000a10| 20 65 6e 64 2c 0d 20 20 | 20 20 73 65 6c 65 63 74 | end,. | select|
|00000a20| 65 64 44 61 74 65 73 3a | 20 5b 5d 2c 0d 20 20 20 |edDates:| [],. |
|00000a30| 20 74 68 65 44 61 74 65 | 3a 20 6e 69 6c 2c 0d 20 | theDate|: nil,. |
|00000a40| 20 20 20 74 68 65 54 69 | 74 6c 65 3a 20 22 74 65 | theTi|tle: "te|
|00000a50| 73 74 22 2c 0d 20 20 20 | 20 74 69 74 6c 65 3a 20 |st",. | title: |
|00000a60| 22 63 6c 4d 6f 6e 74 68 | 56 69 65 77 20 53 61 6d |"clMonth|View Sam|
|00000a70| 70 6c 65 22 2c 0d 20 20 | 20 20 76 69 65 77 53 65 |ple",. | viewSe|
|00000a80| 74 75 70 46 6f 72 6d 53 | 63 72 69 70 74 3a 0d 20 |tupFormS|cript:. |
|00000a90| 20 20 20 20 20 66 75 6e | 63 28 29 0d 20 20 20 20 | fun|c(). |
|00000aa0| 20 20 62 65 67 69 6e 0d | 20 20 20 20 20 20 0d 20 | begin.| . |
|00000ab0| 20 20 20 20 20 09 69 66 | 20 6e 6f 74 20 74 68 65 | .if| not the|
|00000ac0| 44 61 74 65 20 6f 72 20 | 6e 6f 74 20 53 74 72 69 |Date or |not Stri|
|00000ad0| 6e 67 54 6f 44 61 74 65 | 28 74 68 65 44 61 74 65 |ngToDate|(theDate|
|00000ae0| 29 20 74 68 65 6e 20 0d | 20 20 20 20 20 20 09 09 |) then .| ..|
|00000af0| 74 68 65 44 61 74 65 3a | 3d 20 74 69 6d 65 28 29 |theDate:|= time()|
|00000b00| 3b 0d 20 20 20 20 20 20 | 09 65 6c 73 65 0d 20 20 |;. |.else. |
|00000b10| 20 20 20 20 09 09 74 68 | 65 44 61 74 65 20 3a 3d | ..th|eDate :=|
|00000b20| 20 53 74 72 69 6e 67 54 | 6f 44 61 74 65 28 74 68 | StringT|oDate(th|
|00000b30| 65 44 61 74 65 29 3b 0d | 20 20 20 20 20 20 09 0d |eDate);.| ..|
|00000b40| 20 20 20 20 20 20 09 73 | 65 6c 65 63 74 65 64 44 | .s|electedD|
|00000b50| 61 74 65 73 20 3a 3d 20 | 5b 74 68 65 44 61 74 65 |ates := |[theDate|
|00000b60| 5d 3b 0d 20 20 20 20 20 | 20 09 0d 20 20 20 20 20 |];. | .. |
|00000b70| 20 09 69 66 20 64 61 74 | 65 28 74 68 65 44 61 74 | .if dat|e(theDat|
|00000b80| 65 29 2e 68 6f 75 72 3c | 31 32 20 74 68 65 6e 20 |e).hour<|12 then |
|00000b90| 61 6d 70 6d 2e 63 6c 75 | 73 74 65 72 56 61 6c 75 |ampm.clu|sterValu|
|00000ba0| 65 3a 3d 30 3b 0d 20 20 | 20 20 20 20 09 65 6c 73 |e:=0;. | .els|
|00000bb0| 65 20 61 6d 70 6d 2e 63 | 6c 75 73 74 65 72 56 61 |e ampm.c|lusterVa|
|00000bc0| 6c 75 65 3a 3d 31 3b 0d | 20 20 20 20 20 20 09 0d |lue:=1;.| ..|
|00000bd0| 20 20 20 20 20 20 09 73 | 65 74 76 61 6c 75 65 28 | .s|etvalue(|
|00000be0| 70 69 63 6b 65 72 54 69 | 74 6c 65 2c 20 27 74 69 |pickerTi|tle, 'ti|
|00000bf0| 74 6c 65 2c 20 74 68 65 | 54 69 74 6c 65 29 3b 0d |tle, the|Title);.|
|00000c00| 20 20 20 20 20 20 09 0d | 20 20 20 20 20 20 65 6e | ..| en|
|00000c10| 64 2c 0d 20 20 20 20 76 | 69 65 77 54 6f 53 65 74 |d,. v|iewToSet|
|00000c20| 3a 20 6e 69 6c 2c 0d 20 | 20 20 20 55 70 64 61 74 |: nil,. | Updat|
|00000c30| 65 3a 0d 20 20 20 20 20 | 20 66 75 6e 63 28 72 65 |e:. | func(re|
|00000c40| 74 75 72 6e 56 69 65 77 | 2c 20 6d 79 44 61 74 65 |turnView|, myDate|
|00000c50| 2c 20 6d 79 54 69 74 6c | 65 29 0d 20 20 20 20 20 |, myTitl|e). |
|00000c60| 20 62 65 67 69 6e 0d 20 | 20 20 20 20 20 09 73 65 | begin. | .se|
|00000c70| 6c 66 2e 76 69 65 77 54 | 6f 53 65 74 20 3a 3d 20 |lf.viewT|oSet := |
|00000c80| 72 65 74 75 72 6e 56 69 | 65 77 3b 0d 20 20 20 20 |returnVi|ew;. |
|00000c90| 20 20 09 73 65 6c 66 2e | 74 68 65 44 61 74 65 3a | .self.|theDate:|
|00000ca0| 3d 20 6d 79 44 61 74 65 | 3b 0d 20 20 20 20 20 20 |= myDate|;. |
|00000cb0| 09 73 65 6c 66 2e 74 68 | 65 54 69 74 6c 65 20 3a |.self.th|eTitle :|
|00000cc0| 3d 20 6d 79 54 69 74 6c | 65 3b 0d 20 20 20 20 20 |= myTitl|e;. |
|00000cd0| 20 2f 2f 09 73 65 6c 66 | 3a 76 69 65 77 53 65 74 | //.self|:viewSet|
|00000ce0| 55 70 46 6f 72 6d 53 63 | 72 69 70 74 28 29 3b 0d |UpFormSc|ript();.|
|00000cf0| 20 20 20 20 20 20 09 69 | 66 20 6e 6f 74 20 74 68 | .i|f not th|
|00000d00| 65 44 61 74 65 20 6f 72 | 20 6e 6f 74 20 53 74 72 |eDate or| not Str|
|00000d10| 69 6e 67 54 6f 44 61 74 | 65 28 74 68 65 44 61 74 |ingToDat|e(theDat|
|00000d20| 65 29 20 74 68 65 6e 20 | 0d 20 20 20 20 20 20 09 |e) then |. .|
|00000d30| 09 74 68 65 44 61 74 65 | 3a 3d 20 74 69 6d 65 28 |.theDate|:= time(|
|00000d40| 29 3b 0d 20 20 20 20 20 | 20 09 65 6c 73 65 0d 20 |);. | .else. |
|00000d50| 20 20 20 20 20 09 09 74 | 68 65 44 61 74 65 20 3a | ..t|heDate :|
|00000d60| 3d 20 53 74 72 69 6e 67 | 54 6f 44 61 74 65 28 74 |= String|ToDate(t|
|00000d70| 68 65 44 61 74 65 29 3b | 0d 20 20 20 20 20 20 09 |heDate);|. .|
|00000d80| 0d 20 20 20 20 20 20 09 | 73 65 6c 65 63 74 65 64 |. .|selected|
|00000d90| 44 61 74 65 73 20 3a 3d | 20 5b 74 68 65 44 61 74 |Dates :=| [theDat|
|00000da0| 65 5d 3b 0d 20 20 20 20 | 20 20 0d 20 20 20 20 20 |e];. | . |
|00000db0| 20 09 63 6c 6f 63 6b 2e | 68 6f 75 72 73 20 3a 3d | .clock.|hours :=|
|00000dc0| 20 28 74 68 65 44 61 74 | 65 20 44 49 56 20 36 30 | (theDat|e DIV 60|
|00000dd0| 29 20 6d 6f 64 20 32 34 | 3b 0d 20 20 20 20 20 20 |) mod 24|;. |
|00000de0| 09 63 6c 6f 63 6b 2e 6d | 69 6e 75 74 65 73 20 3a |.clock.m|inutes :|
|00000df0| 3d 74 68 65 44 61 74 65 | 20 4d 4f 44 20 36 30 3b |=theDate| MOD 60;|
|00000e00| 0d 20 20 20 20 20 20 09 | 63 6c 6f 63 6b 3a 64 69 |. .|clock:di|
|00000e10| 72 74 79 28 29 3b 0d 20 | 20 20 20 20 20 09 63 6c |rty();. | .cl|
|00000e20| 6f 63 6b 3a 73 65 74 54 | 69 6d 65 28 29 3b 0d 20 |ock:setT|ime();. |
|00000e30| 20 20 20 20 20 0d 20 20 | 20 20 20 20 09 69 66 20 | . | .if |
|00000e40| 64 61 74 65 28 74 68 65 | 44 61 74 65 29 2e 68 6f |date(the|Date).ho|
|00000e50| 75 72 3c 31 32 20 74 68 | 65 6e 20 61 6d 70 6d 3a |ur<12 th|en ampm:|
|00000e60| 73 65 74 43 6c 75 73 74 | 65 72 56 61 6c 75 65 28 |setClust|erValue(|
|00000e70| 30 29 3b 0d 20 20 20 20 | 20 20 09 65 6c 73 65 20 |0);. | .else |
|00000e80| 61 6d 70 6d 3a 73 65 74 | 43 6c 75 73 74 65 72 56 |ampm:set|ClusterV|
|00000e90| 61 6c 75 65 28 31 29 3b | 0d 20 20 20 20 20 20 09 |alue(1);|. .|
|00000ea0| 0d 20 20 20 20 20 20 09 | 73 65 74 76 61 6c 75 65 |. .|setvalue|
|00000eb0| 28 70 69 63 6b 65 72 54 | 69 74 6c 65 2c 20 27 74 |(pickerT|itle, 't|
|00000ec0| 69 74 6c 65 2c 20 74 68 | 65 54 69 74 6c 65 29 3b |itle, th|eTitle);|
|00000ed0| 0d 20 20 20 20 20 20 0d | 20 20 20 20 20 20 09 64 |. .| .d|
|00000ee0| 61 74 65 50 69 63 6b 65 | 72 3a 52 65 66 72 65 73 |atePicke|r:Refres|
|00000ef0| 68 28 29 3b 0d 20 20 20 | 20 20 20 09 70 72 69 6e |h();. | .prin|
|00000f00| 74 28 22 64 61 74 65 74 | 69 6d 65 20 75 70 64 61 |t("datet|ime upda|
|00000f10| 74 65 64 22 29 0d 20 20 | 20 20 20 20 65 6e 64 2c |ted"). | end,|
|00000f20| 0d 20 20 20 20 41 75 74 | 6f 43 6c 6f 73 65 3a 20 |. Aut|oClose: |
|00000f30| 54 72 75 65 2c 0d 20 20 | 20 20 5f 70 72 6f 74 6f |True,. | _proto|
|00000f40| 3a 20 5f 75 73 65 72 70 | 72 6f 74 6f 30 30 30 2c |: _userp|roto000,|
|00000f50| 0d 20 20 20 20 64 65 62 | 75 67 3a 20 22 44 61 74 |. deb|ug: "Dat|
|00000f60| 65 54 69 6d 65 56 69 65 | 77 22 0d 20 20 20 7d 3b |eTimeVie|w". };|
|00000f70| 0d 0d 0d 2f 2f 20 2d 2d | 2d 2d 20 46 69 6c 65 20 |...// --|-- File |
|00000f80| 70 72 6f 74 6f 44 61 74 | 65 50 69 63 6b 65 72 20 |protoDat|ePicker |
|00000f90| 2d 2d 2d 2d 0d 70 72 6f | 74 6f 44 61 74 65 50 69 |----.pro|toDatePi|
|00000fa0| 63 6b 65 72 20 3a 3d 0d | 20 20 20 7b 76 69 65 77 |cker :=.| {view|
|00000fb0| 46 6c 61 67 73 3a 20 31 | 2c 0d 20 20 20 20 76 69 |Flags: 1|,. vi|
|00000fc0| 65 77 46 6f 72 6d 61 74 | 3a 20 6e 69 6c 2c 0d 20 |ewFormat|: nil,. |
|00000fd0| 20 20 20 76 69 65 77 42 | 6f 75 6e 64 73 3a 20 7b | viewB|ounds: {|
|00000fe0| 6c 65 66 74 3a 20 30 2c | 20 74 6f 70 3a 20 30 2c |left: 0,| top: 0,|
|00000ff0| 20 72 69 67 68 74 3a 20 | 31 32 30 2c 20 62 6f 74 | right: |120, bot|
|00001000| 74 6f 6d 3a 20 31 30 30 | 7d 2c 0d 20 20 20 20 6d |tom: 100|},. m|
|00001010| 6f 6e 74 68 43 68 61 6e | 67 65 64 53 63 72 69 70 |onthChan|gedScrip|
|00001020| 74 3a 0d 20 20 20 20 20 | 20 66 75 6e 63 28 29 0d |t:. | func().|
|00001030| 20 20 20 20 20 20 62 65 | 67 69 6e 0d 20 20 20 20 | be|gin. |
|00001040| 20 20 20 20 20 20 2f 2f | 20 54 68 69 73 20 77 69 | //| This wi|
|00001050| 6c 6c 20 62 65 20 69 6e | 68 65 72 69 74 65 64 20 |ll be in|herited |
|00001060| 62 79 20 74 68 65 20 63 | 68 69 6c 64 20 6d 6f 6e |by the c|hild mon|
|00001070| 74 68 20 76 69 65 77 20 | 61 6e 64 20 63 61 6c 6c |th view |and call|
|00001080| 65 64 20 65 76 65 72 79 | 20 74 69 6d 65 0d 20 20 |ed every| time. |
|00001090| 20 20 20 20 20 20 20 20 | 2f 2f 20 74 68 65 20 75 | |// the u|
|000010a0| 73 65 72 20 74 61 70 73 | 20 6f 6e 20 61 20 6e 65 |ser taps| on a ne|
|000010b0| 77 20 64 61 79 2e 20 20 | 49 74 20 2a 6d 75 73 74 |w day. |It *must|
|000010c0| 2a 20 62 65 20 68 65 72 | 65 20 62 65 63 61 75 73 |* be her|e becaus|
|000010d0| 65 20 74 68 65 20 75 73 | 65 72 20 63 61 6e 0d 20 |e the us|er can. |
|000010e0| 20 20 20 20 20 20 20 20 | 20 2f 2f 20 74 61 70 20 | | // tap |
|000010f0| 6f 6e 20 64 61 79 73 20 | 61 74 20 74 68 65 20 65 |on days |at the e|
|00001100| 6e 64 20 6f 72 20 62 65 | 67 69 6e 6e 69 6e 67 20 |nd or be|ginning |
|00001110| 6f 66 20 74 68 65 20 70 | 72 65 76 69 6f 75 73 20 |of the p|revious |
|00001120| 6f 72 20 6e 65 78 74 20 | 6d 6f 6e 74 68 0d 20 20 |or next |month. |
|00001130| 20 20 20 20 20 20 20 20 | 2f 2f 20 28 74 68 65 20 | |// (the |
|00001140| 62 6c 61 6e 6b 20 73 70 | 61 63 65 73 20 6f 6e 20 |blank sp|aces on |
|00001150| 74 68 65 20 76 69 65 77 | 29 20 61 6e 64 20 61 63 |the view|) and ac|
|00001160| 74 75 61 6c 6c 79 20 63 | 68 61 6e 67 65 20 74 68 |tually c|hange th|
|00001170| 65 20 64 61 74 65 21 0d | 20 20 20 20 20 20 20 20 |e date!.| |
|00001180| 20 20 2f 2f 20 49 66 20 | 74 68 69 73 20 73 63 72 | // If |this scr|
|00001190| 69 70 74 20 69 73 6e 27 | 74 20 68 65 72 65 20 74 |ipt isn'|t here t|
|000011a0| 6f 20 75 70 64 61 74 65 | 20 74 68 65 20 76 69 65 |o update| the vie|
|000011b0| 77 20 61 6e 64 20 74 68 | 65 20 74 69 74 6c 65 20 |w and th|e title |
|000011c0| 73 74 72 69 6e 67 2c 0d | 20 20 20 20 20 20 20 20 |string,.| |
|000011d0| 20 20 2f 2f 20 74 68 65 | 20 6d 6f 6e 74 68 20 77 | // the| month w|
|000011e0| 69 74 68 20 63 68 61 6e | 67 65 20 62 75 74 20 74 |ith chan|ge but t|
|000011f0| 68 65 20 64 69 73 70 6c | 61 79 20 77 6f 6e 27 74 |he displ|ay won't|
|00001200| 2d 2d 63 6f 6e 66 75 73 | 69 6e 67 20 74 68 65 20 |--confus|ing the |
|00001210| 68 65 63 6b 20 6f 75 74 | 20 6f 66 0d 20 20 20 20 |heck out| of. |
|00001220| 20 20 20 20 20 20 2f 2f | 20 70 65 6f 70 6c 65 2e | //| people.|
|00001230| 0d 20 20 20 20 20 20 20 | 20 20 20 3a 44 69 72 74 |. | :Dirt|
|00001240| 79 28 29 3b 0d 20 20 20 | 20 20 20 20 20 20 20 3a |y();. | :|
|00001250| 53 65 74 54 69 74 6c 65 | 28 29 3b 0d 20 20 20 20 |SetTitle|();. |
|00001260| 20 20 65 6e 64 2c 0d 20 | 20 20 20 6d 6f 6e 74 68 | end,. | month|
|00001270| 59 65 61 72 53 70 65 63 | 3a 0d 20 20 20 20 20 20 |YearSpec|:. |
|00001280| 47 65 74 44 61 74 65 53 | 74 72 69 6e 67 53 70 65 |GetDateS|tringSpe|
|00001290| 63 28 5b 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |c([. | |
|000012a0| 20 20 5b 6b 45 6c 65 6d | 65 6e 74 4d 6f 6e 74 68 | [kElem|entMonth|
|000012b0| 2c 20 6b 46 6f 72 6d 61 | 74 4c 6f 6e 67 5d 2c 0d |, kForma|tLong],.|
|000012c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 5b 6b | | [k|
|000012d0| 45 6c 65 6d 65 6e 74 59 | 65 61 72 2c 20 20 6b 46 |ElementY|ear, kF|
|000012e0| 6f 72 6d 61 74 4c 6f 6e | 67 5d 5d 29 2c 0d 20 20 |ormatLon|g]]),. |
|000012f0| 20 20 53 65 74 54 69 74 | 6c 65 3a 0d 20 20 20 20 | SetTit|le:. |
|00001300| 20 20 2f 2f 20 54 68 69 | 73 20 66 75 6e 63 74 69 | // Thi|s functi|
|00001310| 6f 6e 20 75 70 64 61 74 | 65 73 20 74 68 65 20 6d |on updat|es the m|
|00001320| 6f 6e 74 68 2f 79 65 61 | 72 20 6c 61 62 65 6c 2e |onth/yea|r label.|
|00001330| 20 20 49 74 20 73 68 6f | 75 6c 64 20 62 65 20 63 | It sho|uld be c|
|00001340| 61 6c 6c 65 64 0d 20 20 | 20 20 20 20 2f 2f 20 77 |alled. | // w|
|00001350| 68 65 6e 65 76 65 72 20 | 74 68 65 20 75 73 65 72 |henever |the user|
|00001360| 20 63 68 61 6e 67 65 73 | 20 74 68 65 20 64 61 74 | changes| the dat|
|00001370| 65 2e 0d 20 20 20 20 20 | 20 0d 20 20 20 20 20 20 |e.. | . |
|00001380| 66 75 6e 63 28 29 0d 20 | 20 20 20 20 20 62 65 67 |func(). | beg|
|00001390| 69 6e 0d 20 20 20 20 20 | 20 20 20 20 20 53 65 74 |in. | Set|
|000013a0| 56 61 6c 75 65 28 6d 6f | 6e 74 68 59 65 61 72 4c |Value(mo|nthYearL|
|000013b0| 61 62 65 6c 2c 20 27 74 | 65 78 74 2c 0d 20 20 20 |abel, 't|ext,. |
|000013c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000013d0| 4c 6f 6e 67 44 61 74 65 | 53 74 72 28 73 65 6c 65 |LongDate|Str(sele|
|000013e0| 63 74 65 64 44 61 74 65 | 73 5b 30 5d 2c 20 6d 6f |ctedDate|s[0], mo|
|000013f0| 6e 74 68 59 65 61 72 53 | 70 65 63 29 29 3b 0d 20 |nthYearS|pec));. |
|00001400| 20 20 20 20 20 65 6e 64 | 2c 0d 20 20 20 20 76 69 | end|,. vi|
|00001410| 65 77 53 65 74 75 70 44 | 6f 6e 65 53 63 72 69 70 |ewSetupD|oneScrip|
|00001420| 74 3a 0d 20 20 20 20 20 | 20 66 75 6e 63 28 29 0d |t:. | func().|
|00001430| 20 20 20 20 20 20 62 65 | 67 69 6e 0d 20 20 20 20 | be|gin. |
|00001440| 20 20 20 20 20 20 69 66 | 20 4e 4f 54 20 73 65 6c | if| NOT sel|
|00001450| 65 63 74 65 64 44 61 74 | 65 73 20 65 78 69 73 74 |ectedDat|es exist|
|00001460| 73 20 74 68 65 6e 0d 20 | 20 20 20 20 20 20 20 20 |s then. | |
|00001470| 20 20 20 20 20 73 65 6c | 66 2e 73 65 6c 65 63 74 | sel|f.select|
|00001480| 65 64 44 61 74 65 73 20 | 3a 3d 20 5b 54 69 6d 65 |edDates |:= [Time|
|00001490| 28 29 5d 3b 20 20 2f 2f | 20 69 6e 69 74 69 61 6c |()]; //| initial|
|000014a0| 69 7a 65 20 73 65 6c 65 | 63 74 65 64 44 61 74 65 |ize sele|ctedDate|
|000014b0| 73 20 74 6f 20 63 75 72 | 72 65 6e 74 0d 20 20 20 |s to cur|rent. |
|000014c0| 20 20 20 20 20 20 20 3a | 53 65 74 54 69 74 6c 65 | :|SetTitle|
|000014d0| 28 29 3b 0d 20 20 20 20 | 20 20 65 6e 64 2c 0d 20 |();. | end,. |
|000014e0| 20 20 20 52 65 66 72 65 | 73 68 3a 0d 20 20 20 20 | Refre|sh:. |
|000014f0| 20 20 2f 2f 20 54 68 69 | 73 20 61 6c 6c 6f 77 73 | // Thi|s allows|
|00001500| 20 73 63 72 69 70 74 73 | 20 6f 75 74 73 69 64 65 | scripts| outside|
|00001510| 20 74 68 65 20 70 72 6f | 74 6f 20 74 6f 20 68 61 | the pro|to to ha|
|00001520| 76 65 20 61 20 6e 69 63 | 65 20 65 6e 74 72 79 20 |ve a nic|e entry |
|00001530| 70 6f 69 6e 74 20 66 6f | 72 0d 20 20 20 20 20 20 |point fo|r. |
|00001540| 2f 2f 20 67 65 74 74 69 | 6e 67 20 74 68 65 20 70 |// getti|ng the p|
|00001550| 69 63 6b 65 72 20 72 65 | 66 72 65 73 68 65 64 20 |icker re|freshed |
|00001560| 77 68 65 6e 20 74 68 65 | 20 73 65 6c 65 63 74 65 |when the| selecte|
|00001570| 64 44 61 74 65 73 20 61 | 72 72 61 79 20 63 68 61 |dDates a|rray cha|
|00001580| 6e 67 65 73 2e 0d 20 20 | 20 20 20 20 0d 20 20 20 |nges.. | . |
|00001590| 20 20 20 66 75 6e 63 28 | 29 0d 20 20 20 20 20 20 | func(|). |
|000015a0| 62 65 67 69 6e 0d 20 20 | 20 20 20 20 20 20 20 20 |begin. | |
|000015b0| 6d 6f 6e 74 68 56 69 65 | 77 3a 44 69 72 74 79 28 |monthVie|w:Dirty(|
|000015c0| 29 3b 0d 20 20 20 20 20 | 20 20 20 20 20 3a 53 65 |);. | :Se|
|000015d0| 74 54 69 74 6c 65 28 29 | 3b 0d 20 20 20 20 20 20 |tTitle()|;. |
|000015e0| 65 6e 64 2c 0d 20 20 20 | 20 76 69 65 77 63 6c 61 |end,. | viewcla|
|000015f0| 73 73 3a 20 37 34 2c 0d | 20 20 20 20 64 65 62 75 |ss: 74,.| debu|
|00001600| 67 3a 20 22 70 72 6f 74 | 6f 44 61 74 65 50 69 63 |g: "prot|oDatePic|
|00001610| 6b 65 72 22 0d 20 20 20 | 7d 3b 0d 0d 6d 6f 6e 74 |ker". |};..mont|
|00001620| 68 59 65 61 72 4c 61 62 | 65 6c 20 3a 3d 20 2f 2a |hYearLab|el := /*|
|00001630| 20 63 68 69 6c 64 20 6f | 66 20 70 72 6f 74 6f 44 | child o|f protoD|
|00001640| 61 74 65 50 69 63 6b 65 | 72 20 2a 2f 0d 20 20 20 |atePicke|r */. |
|00001650| 7b 74 65 78 74 3a 20 22 | 22 2c 0d 20 20 20 20 76 |{text: "|",. v|
|00001660| 69 65 77 42 6f 75 6e 64 | 73 3a 20 7b 6c 65 66 74 |iewBound|s: {left|
|00001670| 3a 20 30 2c 20 74 6f 70 | 3a 20 30 2c 20 72 69 67 |: 0, top|: 0, rig|
|00001680| 68 74 3a 20 30 2c 20 62 | 6f 74 74 6f 6d 3a 20 31 |ht: 0, b|ottom: 1|
|00001690| 35 7d 2c 0d 20 20 20 20 | 76 69 65 77 46 6c 61 67 |5},. |viewFlag|
|000016a0| 73 3a 20 33 2c 0d 20 20 | 20 20 76 69 65 77 4a 75 |s: 3,. | viewJu|
|000016b0| 73 74 69 66 79 3a 20 38 | 33 38 38 36 36 32 2c 0d |stify: 8|388662,.|
|000016c0| 20 20 20 20 5f 70 72 6f | 74 6f 3a 20 70 72 6f 74 | _pro|to: prot|
|000016d0| 6f 53 74 61 74 69 63 54 | 65 78 74 2c 0d 20 20 20 |oStaticT|ext,. |
|000016e0| 20 64 65 62 75 67 3a 20 | 22 6d 6f 6e 74 68 59 65 | debug: |"monthYe|
|000016f0| 61 72 4c 61 62 65 6c 22 | 0d 20 20 20 7d 3b 0d 2f |arLabel"|. };./|
|00001700| 2f 20 56 69 65 77 20 6d | 6f 6e 74 68 59 65 61 72 |/ View m|onthYear|
|00001710| 4c 61 62 65 6c 20 69 73 | 20 64 65 63 6c 61 72 65 |Label is| declare|
|00001720| 64 20 74 6f 20 70 72 6f | 74 6f 44 61 74 65 50 69 |d to pro|toDatePi|
|00001730| 63 6b 65 72 0d 0d 0d 0d | 70 72 65 76 69 6f 75 73 |cker....|previous|
|00001740| 4d 6f 6e 74 68 42 75 74 | 74 6f 6e 20 3a 3d 20 2f |MonthBut|ton := /|
|00001750| 2a 20 63 68 69 6c 64 20 | 6f 66 20 70 72 6f 74 6f |* child |of proto|
|00001760| 44 61 74 65 50 69 63 6b | 65 72 20 2a 2f 0d 20 20 |DatePick|er */. |
|00001770| 20 7b 76 69 65 77 42 6f | 75 6e 64 73 3a 20 7b 6c | {viewBo|unds: {l|
|00001780| 65 66 74 3a 20 30 2c 20 | 74 6f 70 3a 20 30 2c 20 |eft: 0, |top: 0, |
|00001790| 72 69 67 68 74 3a 20 31 | 35 2c 20 62 6f 74 74 6f |right: 1|5, botto|
|000017a0| 6d 3a 20 31 35 7d 2c 0d | 20 20 20 20 76 69 65 77 |m: 15},.| view|
|000017b0| 53 65 74 75 70 46 6f 72 | 6d 53 63 72 69 70 74 3a |SetupFor|mScript:|
|000017c0| 0d 20 20 20 20 20 20 66 | 75 6e 63 28 29 0d 20 20 |. f|unc(). |
|000017d0| 20 20 20 20 62 65 67 69 | 6e 0d 20 20 20 20 20 20 | begi|n. |
|000017e0| 20 20 20 20 2f 2f 20 69 | 6e 69 74 69 61 6c 69 7a | // i|nitializ|
|000017f0| 65 20 74 68 65 20 69 63 | 6f 6e 20 66 72 6f 6d 20 |e the ic|on from |
|00001800| 74 68 65 20 73 79 73 74 | 65 6d 20 62 69 74 6d 61 |the syst|em bitma|
|00001810| 70 20 76 69 61 20 61 20 | 6d 61 67 69 63 20 70 6f |p via a |magic po|
|00001820| 69 6e 74 65 72 2e 0d 20 | 20 20 20 20 20 20 20 20 |inter.. | |
|00001830| 20 73 65 6c 66 2e 69 63 | 6f 6e 20 3a 3d 20 40 33 | self.ic|on := @3|
|00001840| 32 35 3b 20 20 20 20 2f | 2f 20 6c 65 66 74 42 69 |25; /|/ leftBi|
|00001850| 74 6d 61 70 0d 20 20 20 | 20 20 20 65 6e 64 2c 0d |tmap. | end,.|
|00001860| 20 20 20 20 76 69 65 77 | 46 6c 61 67 73 3a 20 35 | view|Flags: 5|
|00001870| 31 35 2c 0d 20 20 20 20 | 76 69 65 77 4a 75 73 74 |15,. |viewJust|
|00001880| 69 66 79 3a 20 36 2c 0d | 20 20 20 20 76 69 65 77 |ify: 6,.| view|
|00001890| 46 6f 72 6d 61 74 3a 20 | 31 2c 0d 20 20 20 20 62 |Format: |1,. b|
|000018a0| 75 74 74 6f 6e 50 72 65 | 73 73 65 64 53 63 72 69 |uttonPre|ssedScri|
|000018b0| 70 74 3a 0d 20 20 20 20 | 20 20 66 75 6e 63 28 29 |pt:. | func()|
|000018c0| 0d 20 20 20 20 20 20 62 | 65 67 69 6e 0d 20 20 20 |. b|egin. |
|000018d0| 20 20 20 20 20 20 20 2f | 2f 20 6d 6f 76 65 20 74 | /|/ move t|
|000018e0| 6f 20 74 68 65 20 70 72 | 65 76 69 6f 75 73 20 6d |o the pr|evious m|
|000018f0| 6f 6e 74 68 2c 20 61 6e | 64 20 6d 61 6b 65 20 73 |onth, an|d make s|
|00001900| 75 72 65 20 74 68 65 20 | 76 69 65 77 73 20 72 65 |ure the |views re|
|00001910| 64 72 61 77 2e 0d 20 20 | 20 20 20 20 20 20 20 20 |draw.. | |
|00001920| 73 65 6c 65 63 74 65 64 | 44 61 74 65 73 5b 30 5d |selected|Dates[0]|
|00001930| 20 3a 3d 20 49 6e 63 72 | 65 6d 65 6e 74 4d 6f 6e | := Incr|ementMon|
|00001940| 74 68 28 73 65 6c 65 63 | 74 65 64 44 61 74 65 73 |th(selec|tedDates|
|00001950| 5b 30 5d 2c 20 2d 31 29 | 3b 0d 20 20 20 20 20 20 |[0], -1)|;. |
|00001960| 20 20 20 20 6d 6f 6e 74 | 68 56 69 65 77 3a 64 69 | mont|hView:di|
|00001970| 72 74 79 28 29 3b 0d 20 | 20 20 20 20 20 20 20 20 |rty();. | |
|00001980| 20 3a 53 65 74 54 69 74 | 6c 65 28 29 3b 0d 20 20 | :SetTit|le();. |
|00001990| 20 20 20 20 0d 20 20 20 | 20 20 20 20 20 20 20 2f | . | /|
|000019a0| 2f 20 68 61 76 65 20 74 | 6f 20 63 61 6c 6c 20 52 |/ have t|o call R|
|000019b0| 65 66 72 65 73 68 56 69 | 65 77 73 20 62 65 63 61 |efreshVi|ews beca|
|000019c0| 75 73 65 20 74 68 69 73 | 20 69 73 20 74 68 65 20 |use this| is the |
|000019d0| 62 75 74 74 6f 6e 50 72 | 65 73 73 65 64 53 63 72 |buttonPr|essedScr|
|000019e0| 69 70 74 2c 0d 20 20 20 | 20 20 20 20 20 20 20 2f |ipt,. | /|
|000019f0| 2f 20 74 68 65 20 76 69 | 65 77 20 6f 74 68 65 72 |/ the vi|ew other|
|00001a00| 77 69 73 65 20 77 6f 75 | 6c 64 6e 27 74 20 67 65 |wise wou|ldn't ge|
|00001a10| 74 20 72 65 66 72 65 73 | 68 65 64 20 75 6e 74 69 |t refres|hed unti|
|00001a20| 6c 20 74 68 65 20 75 73 | 65 72 20 6c 69 66 74 65 |l the us|er lifte|
|00001a30| 64 20 74 68 65 0d 20 20 | 20 20 20 20 20 20 20 20 |d the. | |
|00001a40| 2f 2f 20 70 65 6e 21 20 | 20 49 66 20 79 6f 75 20 |// pen! | If you |
|00001a50| 68 61 64 20 64 6f 6e 65 | 20 74 68 69 73 20 69 6e |had done| this in|
|00001a60| 20 74 68 65 20 62 75 74 | 74 6f 6e 43 6c 69 63 6b | the but|tonClick|
|00001a70| 53 63 72 69 70 74 20 69 | 6e 73 74 65 61 64 2c 20 |Script i|nstead, |
|00001a80| 79 6f 75 0d 20 20 20 20 | 20 20 20 20 20 20 2f 2f |you. | //|
|00001a90| 20 63 6f 75 6c 64 20 73 | 6b 69 70 20 74 68 65 20 | could s|kip the |
|00001aa0| 52 65 66 72 65 73 68 56 | 69 65 77 73 28 29 20 63 |RefreshV|iews() c|
|00001ab0| 61 6c 6c 2e 0d 20 20 20 | 20 20 20 20 20 20 20 52 |all.. | R|
|00001ac0| 65 66 72 65 73 68 56 69 | 65 77 73 28 29 3b 0d 20 |efreshVi|ews();. |
|00001ad0| 20 20 20 20 20 65 6e 64 | 2c 0d 20 20 20 20 69 63 | end|,. ic|
|00001ae0| 6f 6e 3a 20 6e 69 6c 2c | 0d 20 20 20 20 5f 70 72 |on: nil,|. _pr|
|00001af0| 6f 74 6f 3a 20 70 72 6f | 74 6f 50 69 63 74 75 72 |oto: pro|toPictur|
|00001b00| 65 42 75 74 74 6f 6e 2c | 0d 20 20 20 20 64 65 62 |eButton,|. deb|
|00001b10| 75 67 3a 20 22 70 72 65 | 76 69 6f 75 73 4d 6f 6e |ug: "pre|viousMon|
|00001b20| 74 68 42 75 74 74 6f 6e | 22 0d 20 20 20 7d 3b 0d |thButton|". };.|
|00001b30| 0d 0d 0d 6e 65 78 74 4d | 6f 6e 74 68 42 75 74 74 |...nextM|onthButt|
|00001b40| 6f 6e 20 3a 3d 20 2f 2a | 20 63 68 69 6c 64 20 6f |on := /*| child o|
|00001b50| 66 20 70 72 6f 74 6f 44 | 61 74 65 50 69 63 6b 65 |f protoD|atePicke|
|00001b60| 72 20 2a 2f 0d 20 20 20 | 7b 69 63 6f 6e 3a 20 6e |r */. |{icon: n|
|00001b70| 69 6c 2c 0d 20 20 20 20 | 76 69 65 77 42 6f 75 6e |il,. |viewBoun|
|00001b80| 64 73 3a 20 7b 74 6f 70 | 3a 20 30 2c 20 6c 65 66 |ds: {top|: 0, lef|
|00001b90| 74 3a 20 2d 31 35 2c 20 | 72 69 67 68 74 3a 20 30 |t: -15, |right: 0|
|00001ba0| 2c 20 62 6f 74 74 6f 6d | 3a 20 31 35 7d 2c 0d 20 |, bottom|: 15},. |
|00001bb0| 20 20 20 76 69 65 77 53 | 65 74 75 70 46 6f 72 6d | viewS|etupForm|
|00001bc0| 53 63 72 69 70 74 3a 0d | 20 20 20 20 20 20 66 75 |Script:.| fu|
|00001bd0| 6e 63 28 29 0d 20 20 20 | 20 20 20 62 65 67 69 6e |nc(). | begin|
|00001be0| 0d 20 20 20 20 20 20 20 | 20 20 20 2f 2f 20 69 6e |. | // in|
|00001bf0| 69 74 69 61 6c 69 7a 65 | 20 74 68 65 20 62 69 74 |itialize| the bit|
|00001c00| 6d 61 70 20 66 72 6f 6d | 20 74 68 65 20 73 79 73 |map from| the sys|
|00001c10| 74 65 6d 20 52 4f 4d 73 | 20 76 69 61 20 61 20 6d |tem ROMs| via a m|
|00001c20| 61 67 69 63 20 70 6f 69 | 6e 74 65 72 2e 0d 20 20 |agic poi|nter.. |
|00001c30| 20 20 20 20 20 20 20 20 | 73 65 6c 66 2e 69 63 6f | |self.ico|
|00001c40| 6e 20 3a 3d 20 40 33 32 | 36 3b 20 20 20 20 2f 2f |n := @32|6; //|
|00001c50| 20 72 69 67 68 74 42 69 | 74 6d 61 70 0d 20 20 20 | rightBi|tmap. |
|00001c60| 20 20 20 65 6e 64 2c 0d | 20 20 20 20 76 69 65 77 | end,.| view|
|00001c70| 46 6c 61 67 73 3a 20 35 | 31 35 2c 0d 20 20 20 20 |Flags: 5|15,. |
|00001c80| 76 69 65 77 46 6f 72 6d | 61 74 3a 20 31 2c 0d 20 |viewForm|at: 1,. |
|00001c90| 20 20 20 76 69 65 77 4a | 75 73 74 69 66 79 3a 20 | viewJ|ustify: |
|00001ca0| 33 38 2c 0d 20 20 20 20 | 62 75 74 74 6f 6e 50 72 |38,. |buttonPr|
|00001cb0| 65 73 73 65 64 53 63 72 | 69 70 74 3a 0d 20 20 20 |essedScr|ipt:. |
|00001cc0| 20 20 20 66 75 6e 63 28 | 29 0d 20 20 20 20 20 20 | func(|). |
|00001cd0| 62 65 67 69 6e 0d 20 20 | 20 20 20 20 20 20 20 20 |begin. | |
|00001ce0| 2f 2f 20 6d 6f 76 65 20 | 74 6f 20 74 68 65 20 70 |// move |to the p|
|00001cf0| 72 65 76 69 6f 75 73 20 | 6d 6f 6e 74 68 2c 20 61 |revious |month, a|
|00001d00| 6e 64 20 6d 61 6b 65 20 | 73 75 72 65 20 74 68 65 |nd make |sure the|
|00001d10| 20 76 69 65 77 73 20 72 | 65 64 72 61 77 2e 0d 20 | views r|edraw.. |
|00001d20| 20 20 20 20 20 20 20 20 | 20 73 65 6c 65 63 74 65 | | selecte|
|00001d30| 64 44 61 74 65 73 5b 30 | 5d 20 3a 3d 20 49 6e 63 |dDates[0|] := Inc|
|00001d40| 72 65 6d 65 6e 74 4d 6f | 6e 74 68 28 73 65 6c 65 |rementMo|nth(sele|
|00001d50| 63 74 65 64 44 61 74 65 | 73 5b 30 5d 2c 20 31 29 |ctedDate|s[0], 1)|
|00001d60| 3b 0d 20 20 20 20 20 20 | 20 20 20 20 6d 6f 6e 74 |;. | mont|
|00001d70| 68 56 69 65 77 3a 64 69 | 72 74 79 28 29 3b 0d 20 |hView:di|rty();. |
|00001d80| 20 20 20 20 20 20 20 20 | 20 3a 53 65 74 54 69 74 | | :SetTit|
|00001d90| 6c 65 28 29 3b 0d 20 20 | 20 20 20 20 0d 20 20 20 |le();. | . |
|00001da0| 20 20 20 20 20 20 20 2f | 2f 20 68 61 76 65 20 74 | /|/ have t|
|00001db0| 6f 20 63 61 6c 6c 20 52 | 65 66 72 65 73 68 56 69 |o call R|efreshVi|
|00001dc0| 65 77 73 20 62 65 63 61 | 75 73 65 20 74 68 69 73 |ews beca|use this|
|00001dd0| 20 69 73 20 74 68 65 20 | 62 75 74 74 6f 6e 50 72 | is the |buttonPr|
|00001de0| 65 73 73 65 64 53 63 72 | 69 70 74 2c 0d 20 20 20 |essedScr|ipt,. |
|00001df0| 20 20 20 20 20 20 20 2f | 2f 20 74 68 65 20 76 69 | /|/ the vi|
|00001e00| 65 77 20 6f 74 68 65 72 | 77 69 73 65 20 77 6f 75 |ew other|wise wou|
|00001e10| 6c 64 6e 27 74 20 67 65 | 74 20 72 65 66 72 65 73 |ldn't ge|t refres|
|00001e20| 68 65 64 20 75 6e 74 69 | 6c 20 74 68 65 20 75 73 |hed unti|l the us|
|00001e30| 65 72 20 6c 69 66 74 65 | 64 20 74 68 65 0d 20 20 |er lifte|d the. |
|00001e40| 20 20 20 20 20 20 20 20 | 2f 2f 20 70 65 6e 21 20 | |// pen! |
|00001e50| 20 49 66 20 79 6f 75 20 | 68 61 64 20 64 6f 6e 65 | If you |had done|
|00001e60| 20 74 68 69 73 20 69 6e | 20 74 68 65 20 62 75 74 | this in| the but|
|00001e70| 74 6f 6e 43 6c 69 63 6b | 53 63 72 69 70 74 20 69 |tonClick|Script i|
|00001e80| 6e 73 74 65 61 64 2c 20 | 79 6f 75 0d 20 20 20 20 |nstead, |you. |
|00001e90| 20 20 20 20 20 20 2f 2f | 20 63 6f 75 6c 64 20 73 | //| could s|
|00001ea0| 6b 69 70 20 74 68 65 20 | 52 65 66 72 65 73 68 56 |kip the |RefreshV|
|00001eb0| 69 65 77 73 28 29 20 63 | 61 6c 6c 2e 0d 20 20 20 |iews() c|all.. |
|00001ec0| 20 20 20 20 20 20 20 52 | 65 66 72 65 73 68 56 69 | R|efreshVi|
|00001ed0| 65 77 73 28 29 3b 0d 20 | 20 20 20 20 20 65 6e 64 |ews();. | end|
|00001ee0| 2c 0d 20 20 20 20 5f 70 | 72 6f 74 6f 3a 20 70 72 |,. _p|roto: pr|
|00001ef0| 6f 74 6f 50 69 63 74 75 | 72 65 42 75 74 74 6f 6e |otoPictu|reButton|
|00001f00| 2c 0d 20 20 20 20 64 65 | 62 75 67 3a 20 22 6e 65 |,. de|bug: "ne|
|00001f10| 78 74 4d 6f 6e 74 68 42 | 75 74 74 6f 6e 22 0d 20 |xtMonthB|utton". |
|00001f20| 20 20 7d 3b 0d 0d 0d 0d | 6d 6f 6e 74 68 56 69 65 | };....|monthVie|
|00001f30| 77 20 3a 3d 20 2f 2a 20 | 63 68 69 6c 64 20 6f 66 |w := /* |child of|
|00001f40| 20 70 72 6f 74 6f 44 61 | 74 65 50 69 63 6b 65 72 | protoDa|tePicker|
|00001f50| 20 2a 2f 0d 20 20 20 7b | 76 69 65 77 42 6f 75 6e | */. {|viewBoun|
|00001f60| 64 73 3a 20 7b 74 6f 70 | 3a 20 31 35 2c 20 6c 65 |ds: {top|: 15, le|
|00001f70| 66 74 3a 20 31 2c 20 72 | 69 67 68 74 3a 20 2d 31 |ft: 1, r|ight: -1|
|00001f80| 2c 20 62 6f 74 74 6f 6d | 3a 20 2d 31 7d 2c 0d 20 |, bottom|: -1},. |
|00001f90| 20 20 20 76 69 65 77 46 | 6c 61 67 73 3a 20 35 31 | viewF|lags: 51|
|00001fa0| 33 2c 0d 20 20 20 20 76 | 69 65 77 46 6f 72 6d 61 |3,. v|iewForma|
|00001fb0| 74 3a 20 6e 69 6c 2c 0d | 20 20 20 20 6c 61 62 65 |t: nil,.| labe|
|00001fc0| 6c 46 6f 6e 74 3a 20 52 | 4f 4d 5f 66 6f 6e 74 53 |lFont: R|OM_fontS|
|00001fd0| 79 73 74 65 6d 39 42 6f | 6c 64 2c 0d 20 20 20 20 |ystem9Bo|ld,. |
|00001fe0| 64 61 74 65 46 6f 6e 74 | 3a 20 52 4f 4d 5f 66 6f |dateFont|: ROM_fo|
|00001ff0| 6e 74 53 79 73 74 65 6d | 39 2c 0d 20 20 20 20 76 |ntSystem|9,. v|
|00002000| 69 65 77 4a 75 73 74 69 | 66 79 3a 20 32 34 36 2c |iewJusti|fy: 246,|
|00002010| 0d 20 20 20 20 73 69 6e | 67 6c 65 44 61 79 3a 20 |. sin|gleDay: |
|00002020| 74 72 75 65 2c 0d 20 20 | 20 20 76 69 65 77 63 6c |true,. | viewcl|
|00002030| 61 73 73 3a 20 38 30 2c | 0d 20 20 20 20 64 65 62 |ass: 80,|. deb|
|00002040| 75 67 3a 20 22 6d 6f 6e | 74 68 56 69 65 77 22 0d |ug: "mon|thView".|
|00002050| 20 20 20 7d 3b 0d 2f 2f | 20 56 69 65 77 20 6d 6f | };.//| View mo|
|00002060| 6e 74 68 56 69 65 77 20 | 69 73 20 64 65 63 6c 61 |nthView |is decla|
|00002070| 72 65 64 20 74 6f 20 70 | 72 6f 74 6f 44 61 74 65 |red to p|rotoDate|
|00002080| 50 69 63 6b 65 72 0d 0d | 0d 0d 0d 2f 2f 20 2d 2d |Picker..|...// --|
|00002090| 2d 2d 20 42 61 63 6b 20 | 69 6e 20 46 69 6c 65 20 |-- Back |in File |
|000020a0| 70 72 6f 74 6f 44 61 74 | 65 54 69 6d 65 50 69 63 |protoDat|eTimePic|
|000020b0| 6b 65 72 20 2d 2d 2d 2d | 0d 64 61 74 65 50 69 63 |ker ----|.datePic|
|000020c0| 6b 65 72 20 3a 3d 20 2f | 2a 20 63 68 69 6c 64 20 |ker := /|* child |
|000020d0| 6f 66 20 44 61 74 65 54 | 69 6d 65 56 69 65 77 20 |of DateT|imeView |
|000020e0| 2a 2f 0d 20 20 20 7b 76 | 69 65 77 42 6f 75 6e 64 |*/. {v|iewBound|
|000020f0| 73 3a 20 7b 6c 65 66 74 | 3a 20 39 2c 20 74 6f 70 |s: {left|: 9, top|
|00002100| 3a 20 33 30 2c 20 72 69 | 67 68 74 3a 20 31 32 39 |: 30, ri|ght: 129|
|00002110| 2c 20 62 6f 74 74 6f 6d | 3a 20 31 31 38 7d 2c 0d |, bottom|: 118},.|
|00002120| 20 20 20 20 76 69 65 77 | 46 6f 72 6d 61 74 3a 20 | view|Format: |
|00002130| 33 33 36 2c 0d 20 20 20 | 20 5f 70 72 6f 74 6f 3a |336,. | _proto:|
|00002140| 20 70 72 6f 74 6f 44 61 | 74 65 50 69 63 6b 65 72 | protoDa|tePicker|
|00002150| 2c 0d 20 20 20 20 64 65 | 62 75 67 3a 20 22 64 61 |,. de|bug: "da|
|00002160| 74 65 50 69 63 6b 65 72 | 22 0d 20 20 20 7d 3b 0d |tePicker|". };.|
|00002170| 2f 2f 20 56 69 65 77 20 | 64 61 74 65 50 69 63 6b |// View |datePick|
|00002180| 65 72 20 69 73 20 64 65 | 63 6c 61 72 65 64 20 74 |er is de|clared t|
|00002190| 6f 20 44 61 74 65 54 69 | 6d 65 56 69 65 77 0d 0d |o DateTi|meView..|
|000021a0| 0d 0d 0d 2f 2f 20 2d 2d | 2d 2d 20 46 69 6c 65 20 |...// --|-- File |
|000021b0| 70 72 6f 74 6f 41 64 6a | 75 73 74 6f 42 75 74 74 |protoAdj|ustoButt|
|000021c0| 6f 6e 20 2d 2d 2d 2d 0d | 0d 2f 2f 20 42 65 66 6f |on ----.|.// Befo|
|000021d0| 72 65 20 53 63 72 69 70 | 74 20 66 6f 72 20 22 5f |re Scrip|t for "_|
|000021e0| 75 73 65 72 70 72 6f 74 | 6f 30 30 31 22 0d 2f 2f |userprot|o001".//|
|000021f0| 20 43 6f 70 79 72 69 67 | 68 74 2c 20 a9 20 31 39 | Copyrig|ht, . 19|
|00002200| 39 34 20 41 70 70 6c 65 | 20 43 6f 6d 70 75 74 65 |94 Apple| Compute|
|00002210| 72 2e 20 41 6c 6c 20 72 | 69 67 68 74 73 20 72 65 |r. All r|ights re|
|00002220| 73 65 72 76 65 64 2e 0d | 0d 5f 75 73 65 72 70 72 |served..|._userpr|
|00002230| 6f 74 6f 30 30 31 20 3a | 3d 0d 20 20 20 7b 62 75 |oto001 :|=. {bu|
|00002240| 74 74 6f 6e 48 65 69 67 | 68 74 3a 20 31 33 2c 0d |ttonHeig|ht: 13,.|
|00002250| 20 20 20 20 74 65 78 74 | 53 70 61 63 65 72 3a 20 | text|Spacer: |
|00002260| 38 2c 0d 20 20 20 20 76 | 69 65 77 53 65 74 75 70 |8,. v|iewSetup|
|00002270| 46 6f 72 6d 53 63 72 69 | 70 74 3a 0d 20 20 20 20 |FormScri|pt:. |
|00002280| 20 20 66 75 6e 63 28 29 | 0d 20 20 20 20 20 20 62 | func()|. b|
|00002290| 65 67 69 6e 0d 20 20 20 | 20 20 20 09 76 69 65 77 |egin. | .view|
|000022a0| 42 6f 75 6e 64 73 20 3a | 3d 20 52 65 6c 42 6f 75 |Bounds :|= RelBou|
|000022b0| 6e 64 73 28 76 69 65 77 | 42 6f 75 6e 64 73 2e 6c |nds(view|Bounds.l|
|000022c0| 65 66 74 2c 20 76 69 65 | 77 42 6f 75 6e 64 73 2e |eft, vie|wBounds.|
|000022d0| 74 6f 70 2c 0d 20 20 20 | 20 20 20 09 09 09 20 53 |top,. | ... S|
|000022e0| 74 72 46 6f 6e 74 57 69 | 64 74 68 28 74 65 78 74 |trFontWi|dth(text|
|000022f0| 2c 20 76 69 65 77 46 6f | 6e 74 29 20 2b 20 74 65 |, viewFo|nt) + te|
|00002300| 78 74 53 70 61 63 65 72 | 2c 20 62 75 74 74 6f 6e |xtSpacer|, button|
|00002310| 48 65 69 67 68 74 29 20 | 3b 0d 20 20 20 20 20 20 |Height) |;. |
|00002320| 65 6e 64 2c 0d 20 20 20 | 20 76 69 65 77 43 68 61 |end,. | viewCha|
|00002330| 6e 67 65 64 53 63 72 69 | 70 74 3a 0d 20 20 20 20 |ngedScri|pt:. |
|00002340| 20 20 66 75 6e 63 28 73 | 6c 6f 74 2c 20 76 69 65 | func(s|lot, vie|
|00002350| 77 29 0d 20 20 20 20 20 | 20 62 65 67 69 6e 0d 20 |w). | begin. |
|00002360| 20 20 20 20 20 09 69 6e | 68 65 72 69 74 65 64 3a | .in|herited:|
|00002370| 3f 76 69 65 77 43 68 61 | 6e 67 65 64 53 63 72 69 |?viewCha|ngedScri|
|00002380| 70 74 28 73 6c 6f 74 2c | 20 76 69 65 77 29 20 3b |pt(slot,| view) ;|
|00002390| 0d 20 20 20 20 20 20 09 | 69 66 20 73 6c 6f 74 20 |. .|if slot |
|000023a0| 3d 20 27 74 65 78 74 20 | 74 68 65 6e 0d 20 20 20 |= 'text |then. |
|000023b0| 20 20 20 09 09 3a 53 79 | 6e 63 56 69 65 77 28 29 | ..:Sy|ncView()|
|000023c0| 3b 09 09 09 2f 2f 20 53 | 79 6e 63 56 69 65 77 20 |;...// S|yncView |
|000023d0| 63 61 75 73 65 73 20 74 | 68 65 20 76 69 65 77 53 |causes t|he viewS|
|000023e0| 65 74 75 70 46 6f 72 6d | 53 63 72 69 70 74 20 74 |etupForm|Script t|
|000023f0| 6f 20 62 65 20 63 61 6c | 6c 65 64 20 61 67 61 69 |o be cal|led agai|
|00002400| 6e 2c 0d 20 20 20 20 20 | 20 09 09 09 09 09 09 09 |n,. | .......|
|00002410| 09 09 2f 2f 20 77 68 69 | 63 68 20 73 65 74 73 20 |..// whi|ch sets |
|00002420| 74 68 65 20 73 69 7a 65 | 20 62 61 73 65 64 20 6f |the size| based o|
|00002430| 6e 20 74 68 65 20 74 65 | 78 74 2e 0d 20 20 20 20 |n the te|xt.. |
|00002440| 20 20 65 6e 64 2c 0d 20 | 20 20 20 5f 70 72 6f 74 | end,. | _prot|
|00002450| 6f 3a 20 70 72 6f 74 6f | 54 65 78 74 42 75 74 74 |o: proto|TextButt|
|00002460| 6f 6e 0d 20 20 20 7d 3b | 0d 0d 0d 2f 2f 20 2d 2d |on. };|...// --|
|00002470| 2d 2d 20 42 61 63 6b 20 | 69 6e 20 46 69 6c 65 20 |-- Back |in File |
|00002480| 70 72 6f 74 6f 44 61 74 | 65 54 69 6d 65 50 69 63 |protoDat|eTimePic|
|00002490| 6b 65 72 20 2d 2d 2d 2d | 0d 5f 76 69 65 77 30 30 |ker ----|._view00|
|000024a0| 31 20 3a 3d 20 2f 2a 20 | 63 68 69 6c 64 20 6f 66 |1 := /* |child of|
|000024b0| 20 44 61 74 65 54 69 6d | 65 56 69 65 77 20 2a 2f | DateTim|eView */|
|000024c0| 0d 20 20 20 7b 74 65 78 | 74 3a 20 22 54 6f 64 61 |. {tex|t: "Toda|
|000024d0| 79 2f 4e 6f 77 22 2c 0d | 20 20 20 20 62 75 74 74 |y/Now",.| butt|
|000024e0| 6f 6e 43 6c 69 63 6b 53 | 63 72 69 70 74 3a 0d 20 |onClickS|cript:. |
|000024f0| 20 20 20 20 20 66 75 6e | 63 28 29 0d 20 20 20 20 | fun|c(). |
|00002500| 20 20 62 65 67 69 6e 0d | 20 20 20 20 20 20 09 73 | begin.| .s|
|00002510| 65 6c 65 63 74 65 64 44 | 61 74 65 73 20 3a 3d 20 |electedD|ates := |
|00002520| 5b 54 69 6d 65 28 29 5d | 3b 0d 20 20 20 20 20 20 |[Time()]|;. |
|00002530| 09 64 61 74 65 50 69 63 | 6b 65 72 3a 52 65 66 72 |.datePic|ker:Refr|
|00002540| 65 73 68 28 29 3b 0d 20 | 20 20 20 20 20 0d 20 20 |esh();. | . |
|00002550| 20 20 20 20 09 63 6c 6f | 63 6b 2e 68 6f 75 72 73 | .clo|ck.hours|
|00002560| 20 3a 3d 20 28 54 69 6d | 65 28 29 20 44 49 56 20 | := (Tim|e() DIV |
|00002570| 36 30 29 20 6d 6f 64 20 | 32 34 3b 0d 20 20 20 20 |60) mod |24;. |
|00002580| 20 20 09 63 6c 6f 63 6b | 2e 6d 69 6e 75 74 65 73 | .clock|.minutes|
|00002590| 20 3a 3d 20 54 69 6d 65 | 28 29 20 4d 4f 44 20 36 | := Time|() MOD 6|
|000025a0| 30 3b 0d 20 20 20 20 20 | 20 09 63 6c 6f 63 6b 3a |0;. | .clock:|
|000025b0| 64 69 72 74 79 28 29 3b | 0d 20 20 20 20 20 20 09 |dirty();|. .|
|000025c0| 63 6c 6f 63 6b 3a 73 65 | 74 54 69 6d 65 28 29 3b |clock:se|tTime();|
|000025d0| 0d 20 20 20 20 20 20 0d | 20 20 20 20 20 20 09 69 |. .| .i|
|000025e0| 66 20 64 61 74 65 28 54 | 69 6d 65 28 29 29 2e 68 |f date(T|ime()).h|
|000025f0| 6f 75 72 3c 31 32 20 74 | 68 65 6e 20 61 6d 70 6d |our<12 t|hen ampm|
|00002600| 3a 73 65 74 43 6c 75 73 | 74 65 72 56 61 6c 75 65 |:setClus|terValue|
|00002610| 28 30 29 3b 0d 20 20 20 | 20 20 20 09 65 6c 73 65 |(0);. | .else|
|00002620| 20 61 6d 70 6d 3a 73 65 | 74 43 6c 75 73 74 65 72 | ampm:se|tCluster|
|00002630| 56 61 6c 75 65 28 31 29 | 3b 0d 20 20 20 20 20 20 |Value(1)|;. |
|00002640| 0d 20 20 20 20 20 20 65 | 6e 64 2c 0d 20 20 20 20 |. e|nd,. |
|00002650| 76 69 65 77 42 6f 75 6e | 64 73 3a 20 7b 6c 65 66 |viewBoun|ds: {lef|
|00002660| 74 3a 20 39 2c 20 74 6f | 70 3a 20 31 33 32 2c 20 |t: 9, to|p: 132, |
|00002670| 72 69 67 68 74 3a 20 37 | 37 2c 20 62 6f 74 74 6f |right: 7|7, botto|
|00002680| 6d 3a 20 31 34 34 7d 2c | 0d 20 20 20 20 5f 70 72 |m: 144},|. _pr|
|00002690| 6f 74 6f 3a 20 5f 75 73 | 65 72 70 72 6f 74 6f 30 |oto: _us|erproto0|
|000026a0| 30 31 0d 20 20 20 7d 3b | 0d 0d 0d 0d 65 6e 74 65 |01. };|....ente|
|000026b0| 72 20 3a 3d 20 2f 2a 20 | 63 68 69 6c 64 20 6f 66 |r := /* |child of|
|000026c0| 20 44 61 74 65 54 69 6d | 65 56 69 65 77 20 2a 2f | DateTim|eView */|
|000026d0| 0d 20 20 20 7b 74 65 78 | 74 3a 20 22 53 65 74 22 |. {tex|t: "Set"|
|000026e0| 2c 0d 20 20 20 20 62 75 | 74 74 6f 6e 43 6c 69 63 |,. bu|ttonClic|
|000026f0| 6b 53 63 72 69 70 74 3a | 0d 20 20 20 20 20 20 66 |kScript:|. f|
|00002700| 75 6e 63 28 29 0d 20 20 | 20 20 20 20 62 65 67 69 |unc(). | begi|
|00002710| 6e 0d 20 20 20 20 20 20 | 09 6c 6f 63 61 6c 20 61 |n. |.local a|
|00002720| 6d 3a 3d 63 6c 6f 6e 65 | 28 67 65 74 67 6c 6f 62 |m:=clone|(getglob|
|00002730| 61 6c 73 28 29 2e 69 6e | 74 65 72 6e 61 74 69 6f |als().in|ternatio|
|00002740| 6e 61 6c 2e 63 75 72 72 | 65 6e 74 6c 6f 63 61 6c |nal.curr|entlocal|
|00002750| 65 62 75 6e 64 6c 65 2e | 74 69 6d 65 66 6f 72 6d |ebundle.|timeform|
|00002760| 61 74 2e 6d 6f 72 6e 69 | 6e 67 53 74 72 29 3b 0d |at.morni|ngStr);.|
|00002770| 20 20 20 20 20 20 09 6c | 6f 63 61 6c 20 70 6d 3a | .l|ocal pm:|
|00002780| 3d 63 6c 6f 6e 65 28 67 | 65 74 67 6c 6f 62 61 6c |=clone(g|etglobal|
|00002790| 73 28 29 2e 69 6e 74 65 | 72 6e 61 74 69 6f 6e 61 |s().inte|rnationa|
|000027a0| 6c 2e 63 75 72 72 65 6e | 74 6c 6f 63 61 6c 65 62 |l.curren|tlocaleb|
|000027b0| 75 6e 64 6c 65 2e 74 69 | 6d 65 66 6f 72 6d 61 74 |undle.ti|meformat|
|000027c0| 2e 65 76 65 6e 69 6e 67 | 53 74 72 29 3b 0d 20 20 |.evening|Str);. |
|000027d0| 20 20 20 20 0d 20 20 20 | 20 20 20 09 69 66 20 61 | . | .if a|
|000027e0| 6d 70 6d 2e 63 6c 75 73 | 74 65 72 56 61 6c 75 65 |mpm.clus|terValue|
|000027f0| 20 3d 20 30 20 74 68 65 | 6e 0d 20 20 20 20 20 20 | = 0 the|n. |
|00002800| 09 09 78 20 3a 3d 20 73 | 74 72 69 6e 67 74 6f 64 |..x := s|tringtod|
|00002810| 61 74 65 28 6c 6f 6e 67 | 64 61 74 65 73 74 72 28 |ate(long|datestr(|
|00002820| 73 65 6c 65 63 74 65 64 | 44 61 74 65 73 5b 30 5d |selected|Dates[0]|
|00002830| 2c 30 29 20 26 26 20 74 | 68 65 54 69 6d 65 2e 74 |,0) && t|heTime.t|
|00002840| 65 78 74 20 26 20 61 6d | 29 3b 0d 20 20 20 20 20 |ext & am|);. |
|00002850| 20 09 65 6c 73 65 0d 20 | 20 20 20 20 20 09 09 78 | .else. | ..x|
|00002860| 20 3a 3d 20 73 74 72 69 | 6e 67 74 6f 64 61 74 65 | := stri|ngtodate|
|00002870| 28 6c 6f 6e 67 64 61 74 | 65 73 74 72 28 73 65 6c |(longdat|estr(sel|
|00002880| 65 63 74 65 64 44 61 74 | 65 73 5b 30 5d 2c 30 29 |ectedDat|es[0],0)|
|00002890| 20 26 26 20 74 68 65 54 | 69 6d 65 2e 74 65 78 74 | && theT|ime.text|
|000028a0| 20 26 20 70 6d 29 3b 0d | 20 20 20 20 20 20 0d 20 | & pm);.| . |
|000028b0| 20 20 20 20 20 09 76 69 | 65 77 54 6f 53 65 74 3a | .vi|ewToSet:|
|000028c0| 50 69 63 6b 65 64 44 61 | 74 65 28 78 29 3b 09 0d |PickedDa|te(x);..|
|000028d0| 20 20 20 20 20 20 2f 2f | 09 53 65 74 56 61 6c 75 | //|.SetValu|
|000028e0| 65 28 76 69 65 77 54 6f | 53 65 74 2c 20 27 74 65 |e(viewTo|Set, 'te|
|000028f0| 78 74 2c 20 44 61 74 65 | 4e 54 69 6d 65 28 78 29 |xt, Date|NTime(x)|
|00002900| 29 3b 0d 20 20 20 20 20 | 20 09 69 66 20 61 75 74 |);. | .if aut|
|00002910| 6f 43 6c 6f 73 65 20 74 | 68 65 6e 20 3a 50 61 72 |oClose t|hen :Par|
|00002920| 65 6e 74 28 29 3a 43 6c | 6f 73 65 28 29 3b 0d 20 |ent():Cl|ose();. |
|00002930| 20 20 20 20 20 65 6e 64 | 2c 0d 20 20 20 20 76 69 | end|,. vi|
|00002940| 65 77 42 6f 75 6e 64 73 | 3a 20 7b 6c 65 66 74 3a |ewBounds|: {left:|
|00002950| 20 31 30 37 2c 20 74 6f | 70 3a 20 31 33 32 2c 20 | 107, to|p: 132, |
|00002960| 72 69 67 68 74 3a 20 31 | 36 31 2c 20 62 6f 74 74 |right: 1|61, bott|
|00002970| 6f 6d 3a 20 31 34 34 7d | 2c 0d 20 20 20 20 5f 70 |om: 144}|,. _p|
|00002980| 72 6f 74 6f 3a 20 5f 75 | 73 65 72 70 72 6f 74 6f |roto: _u|serproto|
|00002990| 30 30 31 2c 0d 20 20 20 | 20 64 65 62 75 67 3a 20 |001,. | debug: |
|000029a0| 22 65 6e 74 65 72 22 0d | 20 20 20 7d 3b 0d 2f 2f |"enter".| };.//|
|000029b0| 20 56 69 65 77 20 65 6e | 74 65 72 20 69 73 20 64 | View en|ter is d|
|000029c0| 65 63 6c 61 72 65 64 20 | 74 6f 20 44 61 74 65 54 |eclared |to DateT|
|000029d0| 69 6d 65 56 69 65 77 0d | 0d 0d 0d 63 6c 6f 63 6b |imeView.|...clock|
|000029e0| 20 3a 3d 20 2f 2a 20 63 | 68 69 6c 64 20 6f 66 20 | := /* c|hild of |
|000029f0| 44 61 74 65 54 69 6d 65 | 56 69 65 77 20 2a 2f 0d |DateTime|View */.|
|00002a00| 20 20 20 7b 0d 20 20 20 | 20 74 69 6d 65 43 68 61 | {. | timeCha|
|00002a10| 6e 67 65 64 3a 0d 20 20 | 20 20 20 20 66 75 6e 63 |nged:. | func|
|00002a20| 28 29 0d 20 20 20 20 20 | 20 62 65 67 69 6e 0d 20 |(). | begin. |
|00002a30| 20 20 20 20 20 09 2f 2f | 20 64 6f 20 74 68 69 73 | .//| do this|
|00002a40| 20 73 6f 20 74 68 65 20 | 6f 6c 64 20 68 61 6e 64 | so the |old hand|
|00002a50| 73 20 61 72 65 20 65 72 | 61 73 65 64 2e 2e 2e 0d |s are er|ased....|
|00002a60| 20 20 20 20 20 20 09 73 | 65 6c 66 3a 44 69 72 74 | .s|elf:Dirt|
|00002a70| 79 28 29 3b 0d 20 20 20 | 20 20 20 09 0d 20 20 20 |y();. | .. |
|00002a80| 20 20 20 09 2f 2f 20 74 | 68 69 73 20 69 73 20 6a | .// t|his is j|
|00002a90| 75 73 74 20 66 6f 72 20 | 66 75 6e 2c 20 70 75 74 |ust for |fun, put|
|00002aa0| 20 79 6f 75 72 20 6f 77 | 6e 20 73 74 75 66 66 20 | your ow|n stuff |
|00002ab0| 68 65 72 65 2e 2e 2e 0d | 20 20 20 20 20 20 09 2f |here....| ./|
|00002ac0| 2f 70 72 69 6e 74 28 22 | 48 3a 22 20 26 26 20 68 |/print("|H:" && h|
|00002ad0| 6f 75 72 73 20 26 26 20 | 22 4d 3a 22 20 26 26 20 |ours && |"M:" && |
|00002ae0| 6d 69 6e 75 74 65 73 29 | 3b 0d 20 20 20 20 20 20 |minutes)|;. |
|00002af0| 09 0d 20 20 20 20 20 20 | 09 3a 73 65 74 54 69 6d |.. |.:setTim|
|00002b00| 65 28 29 3b 0d 20 20 20 | 20 20 20 09 0d 20 20 20 |e();. | .. |
|00002b10| 20 20 20 09 0d 20 20 20 | 20 20 20 09 0d 20 20 20 | .. | .. |
|00002b20| 20 20 20 65 6e 64 2c 0d | 20 20 20 20 68 6f 75 72 | end,.| hour|
|00002b30| 73 3a 20 31 34 2c 0d 20 | 20 20 20 6d 69 6e 75 74 |s: 14,. | minut|
|00002b40| 65 73 3a 20 31 30 2c 0d | 20 20 20 20 76 69 65 77 |es: 10,.| view|
|00002b50| 42 6f 75 6e 64 73 3a 20 | 7b 6c 65 66 74 3a 20 31 |Bounds: |{left: 1|
|00002b60| 35 32 2c 20 74 6f 70 3a | 20 32 36 2c 20 72 69 67 |52, top:| 26, rig|
|00002b70| 68 74 3a 20 32 31 36 2c | 20 62 6f 74 74 6f 6d 3a |ht: 216,| bottom:|
|00002b80| 20 39 30 7d 2c 0d 20 20 | 20 20 76 69 65 77 53 65 | 90},. | viewSe|
|00002b90| 74 75 70 46 6f 72 6d 53 | 63 72 69 70 74 3a 0d 20 |tupFormS|cript:. |
|00002ba0| 20 20 20 20 20 66 75 6e | 63 28 29 0d 20 20 20 20 | fun|c(). |
|00002bb0| 20 20 62 65 67 69 6e 0d | 20 20 20 20 20 20 09 73 | begin.| .s|
|00002bc0| 65 6c 66 2e 68 6f 75 72 | 73 20 3a 3d 20 28 74 68 |elf.hour|s := (th|
|00002bd0| 65 44 61 74 65 20 44 49 | 56 20 36 30 29 20 6d 6f |eDate DI|V 60) mo|
|00002be0| 64 20 32 34 3b 0d 20 20 | 20 20 20 20 09 73 65 6c |d 24;. | .sel|
|00002bf0| 66 2e 6d 69 6e 75 74 65 | 73 20 3a 3d 20 74 68 65 |f.minute|s := the|
|00002c00| 44 61 74 65 20 4d 4f 44 | 20 36 30 3b 0d 20 20 20 |Date MOD| 60;. |
|00002c10| 20 20 20 09 73 65 6c 66 | 3a 64 69 72 74 79 28 29 | .self|:dirty()|
|00002c20| 3b 0d 20 20 20 20 20 20 | 09 3a 73 65 74 54 49 6d |;. |.:setTIm|
|00002c30| 65 28 29 3b 0d 20 20 20 | 20 20 20 2f 2f 09 70 72 |e();. | //.pr|
|00002c40| 69 6e 74 28 22 43 6c 6f | 63 6b 20 73 65 74 20 75 |int("Clo|ck set u|
|00002c50| 70 22 29 3b 0d 20 20 20 | 20 20 20 65 6e 64 2c 0d |p");. | end,.|
|00002c60| 20 20 20 20 53 65 74 54 | 69 6d 65 3a 0d 20 20 20 | SetT|ime:. |
|00002c70| 20 20 20 66 75 6e 63 28 | 29 0d 20 20 20 20 20 20 | func(|). |
|00002c80| 62 65 67 69 6e 0d 20 20 | 20 20 20 20 09 6c 6f 63 |begin. | .loc|
|00002c90| 61 6c 20 6d 79 48 6f 75 | 72 73 3a 3d 73 65 6c 66 |al myHou|rs:=self|
|00002ca0| 2e 68 6f 75 72 73 2c 20 | 0d 20 20 20 20 20 20 09 |.hours, |. .|
|00002cb0| 09 09 6d 79 4d 69 6e 75 | 74 65 73 20 3a 3d 20 73 |..myMinu|tes := s|
|00002cc0| 65 6c 66 2e 6d 69 6e 75 | 74 65 73 2c 20 0d 20 20 |elf.minu|tes, . |
|00002cd0| 20 20 20 20 09 09 09 78 | 2c 20 79 2c 20 6d 79 41 | ...x|, y, myA|
|00002ce0| 72 72 61 79 3b 0d 20 20 | 20 20 20 20 0d 20 20 20 |rray;. | . |
|00002cf0| 20 20 20 2f 2f 70 72 69 | 6e 74 28 68 6f 75 72 73 | //pri|nt(hours|
|00002d00| 26 6d 69 6e 75 74 65 73 | 29 3b 0d 20 20 20 20 20 |&minutes|);. |
|00002d10| 20 0d 20 20 20 20 20 20 | 09 69 66 20 47 65 74 4c | . |.if GetL|
|00002d20| 6f 63 61 6c 65 28 29 2e | 54 69 6d 65 46 6f 72 6d |ocale().|TimeForm|
|00002d30| 61 74 2e 74 69 6d 65 43 | 79 63 6c 65 20 3d 20 6b |at.timeC|ycle = k|
|00002d40| 43 79 63 6c 65 31 32 20 | 74 68 65 6e 20 62 65 67 |Cycle12 |then beg|
|00002d50| 69 6e 09 0d 20 20 20 20 | 20 20 09 09 69 66 20 6d |in.. | ..if m|
|00002d60| 79 48 6f 75 72 73 20 3d | 20 30 20 74 68 65 6e 20 |yHours =| 0 then |
|00002d70| 6d 79 48 6f 75 72 73 3a | 3d 31 32 3b 0d 20 20 20 |myHours:|=12;. |
|00002d80| 20 20 20 09 09 69 66 20 | 6d 79 48 6f 75 72 73 20 | ..if |myHours |
|00002d90| 3e 20 31 32 20 74 68 65 | 6e 20 6d 79 48 6f 75 72 |> 12 the|n myHour|
|00002da0| 73 20 3a 3d 20 6d 79 48 | 6f 75 72 73 20 2d 20 31 |s := myH|ours - 1|
|00002db0| 32 3b 0d 20 20 20 20 20 | 20 09 65 6e 64 20 65 6c |2;. | .end el|
|00002dc0| 73 65 20 62 65 67 69 6e | 0d 20 20 20 20 20 20 09 |se begin|. .|
|00002dd0| 09 69 66 20 61 6d 70 6d | 2e 63 6c 75 73 74 65 72 |.if ampm|.cluster|
|00002de0| 56 61 6c 75 65 20 3d 20 | 31 20 74 68 65 6e 20 62 |Value = |1 then b|
|00002df0| 65 67 69 6e 0d 20 20 20 | 20 20 20 09 09 09 69 66 |egin. | ...if|
|00002e00| 20 6d 79 48 6f 75 72 73 | 20 3c 20 31 32 20 74 68 | myHours| < 12 th|
|00002e10| 65 6e 0d 20 20 20 20 20 | 20 09 09 09 09 6d 79 48 |en. | ....myH|
|00002e20| 6f 75 72 73 20 3a 3d 20 | 6d 79 48 6f 75 72 73 20 |ours := |myHours |
|00002e30| 2b 20 31 32 3b 0d 20 20 | 20 20 20 20 09 09 65 6e |+ 12;. | ..en|
|00002e40| 64 20 65 6c 73 65 20 62 | 65 67 69 6e 0d 20 20 20 |d else b|egin. |
|00002e50| 20 20 20 09 09 09 69 66 | 20 6d 79 48 6f 75 72 73 | ...if| myHours|
|00002e60| 20 3e 20 31 31 20 74 68 | 65 6e 0d 20 20 20 20 20 | > 11 th|en. |
|00002e70| 20 09 09 09 09 6d 79 48 | 6f 75 72 73 20 3a 3d 20 | ....myH|ours := |
|00002e80| 6d 79 48 6f 75 72 73 20 | 2d 20 31 32 3b 0d 20 20 |myHours |- 12;. |
|00002e90| 20 20 20 20 09 09 65 6e | 64 3b 0d 20 20 20 20 20 | ..en|d;. |
|00002ea0| 20 09 65 6e 64 3b 0d 20 | 20 20 20 20 20 0d 20 20 | .end;. | . |
|00002eb0| 20 20 20 20 0d 20 20 20 | 20 20 20 09 79 3a 3d 63 | . | .y:=c|
|00002ec0| 6c 6f 6e 65 28 67 65 74 | 67 6c 6f 62 61 6c 73 28 |lone(get|globals(|
|00002ed0| 29 2e 69 6e 74 65 72 6e | 61 74 69 6f 6e 61 6c 2e |).intern|ational.|
|00002ee0| 63 75 72 72 65 6e 74 6c | 6f 63 61 6c 65 62 75 6e |currentl|ocalebun|
|00002ef0| 64 6c 65 2e 74 69 6d 65 | 66 6f 72 6d 61 74 2e 74 |dle.time|format.t|
|00002f00| 69 6d 65 53 65 70 53 74 | 72 31 29 3b 0d 20 20 20 |imeSepSt|r1);. |
|00002f10| 20 20 20 09 09 0d 20 20 | 20 20 20 20 09 09 0d 20 | ... | ... |
|00002f20| 20 20 20 20 20 09 69 66 | 20 6d 79 4d 69 6e 75 74 | .if| myMinut|
|00002f30| 65 73 20 3c 20 31 30 20 | 74 68 65 6e 20 0d 20 20 |es < 10 |then . |
|00002f40| 20 20 20 20 09 09 78 3a | 3d 28 6d 79 48 6f 75 72 | ..x:|=(myHour|
|00002f50| 73 20 26 20 79 20 26 20 | 22 30 22 20 26 20 6d 79 |s & y & |"0" & my|
|00002f60| 4d 69 6e 75 74 65 73 29 | 3b 0d 20 20 20 20 20 20 |Minutes)|;. |
|00002f70| 09 65 6c 73 65 20 0d 20 | 20 20 20 20 20 09 09 78 |.else . | ..x|
|00002f80| 3a 3d 28 6d 79 48 6f 75 | 72 73 20 26 20 79 20 26 |:=(myHou|rs & y &|
|00002f90| 20 6d 79 4d 69 6e 75 74 | 65 73 29 3b 0d 20 20 20 | myMinut|es);. |
|00002fa0| 20 20 20 09 0d 20 20 20 | 20 20 20 09 73 65 74 76 | .. | .setv|
|00002fb0| 61 6c 75 65 28 74 68 65 | 54 69 6d 65 2c 20 27 74 |alue(the|Time, 't|
|00002fc0| 65 78 74 2c 20 78 29 3b | 0d 20 20 20 20 20 20 65 |ext, x);|. e|
|00002fd0| 6e 64 2c 0d 20 20 20 20 | 5f 70 72 6f 74 6f 3a 20 |nd,. |_proto: |
|00002fe0| 70 72 6f 74 6f 53 65 74 | 43 6c 6f 63 6b 2c 0d 20 |protoSet|Clock,. |
|00002ff0| 20 20 20 64 65 62 75 67 | 3a 20 22 63 6c 6f 63 6b | debug|: "clock|
|00003000| 22 0d 20 20 20 7d 3b 0d | 2f 2f 20 56 69 65 77 20 |". };.|// View |
|00003010| 63 6c 6f 63 6b 20 69 73 | 20 64 65 63 6c 61 72 65 |clock is| declare|
|00003020| 64 20 74 6f 20 44 61 74 | 65 54 69 6d 65 56 69 65 |d to Dat|eTimeVie|
|00003030| 77 0d 0d 0d 0d 74 68 65 | 54 69 6d 65 20 3a 3d 20 |w....the|Time := |
|00003040| 2f 2a 20 63 68 69 6c 64 | 20 6f 66 20 44 61 74 65 |/* child| of Date|
|00003050| 54 69 6d 65 56 69 65 77 | 20 2a 2f 0d 20 20 20 7b |TimeView| */. {|
|00003060| 74 65 78 74 3a 20 22 30 | 30 3a 30 30 22 2c 0d 20 |text: "0|0:00",. |
|00003070| 20 20 20 76 69 65 77 42 | 6f 75 6e 64 73 3a 20 7b | viewB|ounds: {|
|00003080| 6c 65 66 74 3a 20 31 36 | 37 2c 20 74 6f 70 3a 20 |left: 16|7, top: |
|00003090| 39 36 2c 20 72 69 67 68 | 74 3a 20 32 30 32 2c 20 |96, righ|t: 202, |
|000030a0| 62 6f 74 74 6f 6d 3a 20 | 31 31 30 7d 2c 0d 20 20 |bottom: |110},. |
|000030b0| 20 20 76 69 65 77 46 6f | 6e 74 3a 20 73 69 6d 70 | viewFo|nt: simp|
|000030c0| 6c 65 46 6f 6e 74 39 2c | 0d 20 20 20 20 76 69 65 |leFont9,|. vie|
|000030d0| 77 4a 75 73 74 69 66 79 | 3a 20 38 33 38 38 36 31 |wJustify|: 838861|
|000030e0| 30 2c 0d 20 20 20 20 5f | 70 72 6f 74 6f 3a 20 70 |0,. _|proto: p|
|000030f0| 72 6f 74 6f 53 74 61 74 | 69 63 54 65 78 74 2c 0d |rotoStat|icText,.|
|00003100| 20 20 20 20 64 65 62 75 | 67 3a 20 22 74 68 65 54 | debu|g: "theT|
|00003110| 69 6d 65 22 0d 20 20 20 | 7d 3b 0d 2f 2f 20 56 69 |ime". |};.// Vi|
|00003120| 65 77 20 74 68 65 54 69 | 6d 65 20 69 73 20 64 65 |ew theTi|me is de|
|00003130| 63 6c 61 72 65 64 20 74 | 6f 20 44 61 74 65 54 69 |clared t|o DateTi|
|00003140| 6d 65 56 69 65 77 0d 0d | 0d 0d 70 69 63 6b 65 72 |meView..|..picker|
|00003150| 54 69 74 6c 65 20 3a 3d | 20 2f 2a 20 63 68 69 6c |Title :=| /* chil|
|00003160| 64 20 6f 66 20 44 61 74 | 65 54 69 6d 65 56 69 65 |d of Dat|eTimeVie|
|00003170| 77 20 2a 2f 0d 20 20 20 | 7b 74 69 74 6c 65 3a 20 |w */. |{title: |
|00003180| 22 54 69 74 6c 65 22 2c | 0d 20 20 20 20 76 69 65 |"Title",|. vie|
|00003190| 77 42 6f 75 6e 64 73 3a | 20 7b 6c 65 66 74 3a 20 |wBounds:| {left: |
|000031a0| 34 2c 20 74 6f 70 3a 20 | 37 2c 20 72 69 67 68 74 |4, top: |7, right|
|000031b0| 3a 20 32 30 30 2c 20 62 | 6f 74 74 6f 6d 3a 20 32 |: 200, b|ottom: 2|
|000031c0| 33 7d 2c 0d 20 20 20 20 | 5f 70 72 6f 74 6f 3a 20 |3},. |_proto: |
|000031d0| 70 72 6f 74 6f 54 69 74 | 6c 65 2c 0d 20 20 20 20 |protoTit|le,. |
|000031e0| 64 65 62 75 67 3a 20 22 | 70 69 63 6b 65 72 54 69 |debug: "|pickerTi|
|000031f0| 74 6c 65 22 0d 20 20 20 | 7d 3b 0d 2f 2f 20 56 69 |tle". |};.// Vi|
|00003200| 65 77 20 70 69 63 6b 65 | 72 54 69 74 6c 65 20 69 |ew picke|rTitle i|
|00003210| 73 20 64 65 63 6c 61 72 | 65 64 20 74 6f 20 44 61 |s declar|ed to Da|
|00003220| 74 65 54 69 6d 65 56 69 | 65 77 0d 0d 0d 0d 61 6d |teTimeVi|ew....am|
|00003230| 70 6d 20 3a 3d 20 2f 2a | 20 63 68 69 6c 64 20 6f |pm := /*| child o|
|00003240| 66 20 44 61 74 65 54 69 | 6d 65 56 69 65 77 20 2a |f DateTi|meView *|
|00003250| 2f 0d 20 20 20 7b 76 69 | 65 77 42 6f 75 6e 64 73 |/. {vi|ewBounds|
|00003260| 3a 20 7b 6c 65 66 74 3a | 20 31 35 32 2c 20 74 6f |: {left:| 152, to|
|00003270| 70 3a 20 31 31 30 2c 20 | 72 69 67 68 74 3a 20 32 |p: 110, |right: 2|
|00003280| 32 34 2c 20 62 6f 74 74 | 6f 6d 3a 20 31 32 36 7d |24, bott|om: 126}|
|00003290| 2c 0d 20 20 20 20 5f 70 | 72 6f 74 6f 3a 20 70 72 |,. _p|roto: pr|
|000032a0| 6f 74 6f 52 61 64 69 6f | 43 6c 75 73 74 65 72 2c |otoRadio|Cluster,|
|000032b0| 0d 20 20 20 20 64 65 62 | 75 67 3a 20 22 61 6d 70 |. deb|ug: "amp|
|000032c0| 6d 22 0d 20 20 20 7d 3b | 0d 2f 2f 20 56 69 65 77 |m". };|.// View|
|000032d0| 20 61 6d 70 6d 20 69 73 | 20 64 65 63 6c 61 72 65 | ampm is| declare|
|000032e0| 64 20 74 6f 20 44 61 74 | 65 54 69 6d 65 56 69 65 |d to Dat|eTimeVie|
|000032f0| 77 0d 0d 61 6d 20 3a 3d | 20 2f 2a 20 63 68 69 6c |w..am :=| /* chil|
|00003300| 64 20 6f 66 20 61 6d 70 | 6d 20 2a 2f 0d 20 20 20 |d of amp|m */. |
|00003310| 7b 62 75 74 74 6f 6e 56 | 61 6c 75 65 3a 20 30 2c |{buttonV|alue: 0,|
|00003320| 0d 20 20 20 20 76 69 65 | 77 42 6f 75 6e 64 73 3a |. vie|wBounds:|
|00003330| 20 7b 6c 65 66 74 3a 20 | 30 2c 20 74 6f 70 3a 20 | {left: |0, top: |
|00003340| 30 2c 20 72 69 67 68 74 | 3a 20 33 32 2c 20 62 6f |0, right|: 32, bo|
|00003350| 74 74 6f 6d 3a 20 31 33 | 7d 2c 0d 20 20 20 20 74 |ttom: 13|},. t|
|00003360| 65 78 74 3a 20 22 41 4d | 22 2c 0d 20 20 20 20 76 |ext: "AM|",. v|
|00003370| 69 65 77 53 65 74 75 70 | 46 6f 72 6d 53 63 72 69 |iewSetup|FormScri|
|00003380| 70 74 3a 0d 20 20 20 20 | 20 20 66 75 6e 63 28 29 |pt:. | func()|
|00003390| 0d 20 20 20 20 20 20 62 | 65 67 69 6e 0d 20 20 20 |. b|egin. |
|000033a0| 20 20 20 2f 2f 09 6c 6f | 63 61 6c 20 78 3a 3d 63 | //.lo|cal x:=c|
|000033b0| 6c 6f 6e 65 28 67 65 74 | 67 6c 6f 62 61 6c 73 28 |lone(get|globals(|
|000033c0| 29 2e 69 6e 74 65 72 6e | 61 74 69 6f 6e 61 6c 2e |).intern|ational.|
|000033d0| 63 75 72 72 65 6e 74 6c | 6f 63 61 6c 65 62 75 6e |currentl|ocalebun|
|000033e0| 64 6c 65 2e 74 69 6d 65 | 66 6f 72 6d 61 74 2e 6d |dle.time|format.m|
|000033f0| 6f 72 6e 69 6e 67 53 74 | 72 29 3b 0d 20 20 20 20 |orningSt|r);. |
|00003400| 20 20 2f 2f 09 73 65 74 | 56 61 6c 75 65 28 73 65 | //.set|Value(se|
|00003410| 6c 66 2c 20 27 74 65 78 | 74 2c 20 74 72 69 6d 73 |lf, 'tex|t, trims|
|00003420| 74 72 69 6e 67 28 78 29 | 29 3b 0d 20 20 20 20 20 |tring(x)|);. |
|00003430| 20 2f 2f 09 70 72 69 6e | 74 28 74 72 69 6d 73 74 | //.prin|t(trimst|
|00003440| 72 69 6e 67 28 78 29 29 | 3b 0d 20 20 20 20 20 20 |ring(x))|;. |
|00003450| 65 6e 64 2c 0d 20 20 20 | 20 5f 70 72 6f 74 6f 3a |end,. | _proto:|
|00003460| 20 70 72 6f 74 6f 52 61 | 64 69 6f 42 75 74 74 6f | protoRa|dioButto|
|00003470| 6e 2c 0d 20 20 20 20 64 | 65 62 75 67 3a 20 22 61 |n,. d|ebug: "a|
|00003480| 6d 22 0d 20 20 20 7d 3b | 0d 0d 0d 0d 70 6d 20 3a |m". };|....pm :|
|00003490| 3d 20 2f 2a 20 63 68 69 | 6c 64 20 6f 66 20 61 6d |= /* chi|ld of am|
|000034a0| 70 6d 20 2a 2f 0d 20 20 | 20 7b 62 75 74 74 6f 6e |pm */. | {button|
|000034b0| 56 61 6c 75 65 3a 20 31 | 2c 0d 20 20 20 20 76 69 |Value: 1|,. vi|
|000034c0| 65 77 42 6f 75 6e 64 73 | 3a 20 7b 6c 65 66 74 3a |ewBounds|: {left:|
|000034d0| 20 33 35 2c 20 74 6f 70 | 3a 20 30 2c 20 72 69 67 | 35, top|: 0, rig|
|000034e0| 68 74 3a 20 36 37 2c 20 | 62 6f 74 74 6f 6d 3a 20 |ht: 67, |bottom: |
|000034f0| 31 33 7d 2c 0d 20 20 20 | 20 74 65 78 74 3a 20 22 |13},. | text: "|
|00003500| 50 4d 22 2c 0d 20 20 20 | 20 76 69 65 77 53 65 74 |PM",. | viewSet|
|00003510| 75 70 46 6f 72 6d 53 63 | 72 69 70 74 3a 0d 20 20 |upFormSc|ript:. |
|00003520| 20 20 20 20 66 75 6e 63 | 28 29 0d 20 20 20 20 20 | func|(). |
|00003530| 20 62 65 67 69 6e 0d 20 | 20 20 20 20 20 2f 2f 09 | begin. | //.|
|00003540| 69 66 20 30 20 3d 20 53 | 74 72 4c 65 6e 28 67 65 |if 0 = S|trLen(ge|
|00003550| 74 67 6c 6f 62 61 6c 73 | 28 29 2e 69 6e 74 65 72 |tglobals|().inter|
|00003560| 6e 61 74 69 6f 6e 61 6c | 2e 63 75 72 72 65 6e 74 |national|.current|
|00003570| 6c 6f 63 61 6c 65 62 75 | 6e 64 6c 65 2e 74 69 6d |localebu|ndle.tim|
|00003580| 65 66 6f 72 6d 61 74 2e | 65 76 65 6e 69 6e 67 53 |eformat.|eveningS|
|00003590| 74 72 29 20 74 68 65 6e | 0d 20 20 20 20 20 20 2f |tr) then|. /|
|000035a0| 2f 09 73 65 74 56 61 6c | 75 65 28 73 65 6c 66 2c |/.setVal|ue(self,|
|000035b0| 20 27 74 65 78 74 2c 20 | 74 72 69 6d 73 74 72 69 | 'text, |trimstri|
|000035c0| 6e 67 28 78 29 29 3b 0d | 20 20 20 20 20 20 2f 2f |ng(x));.| //|
|000035d0| 09 70 72 69 6e 74 28 74 | 72 69 6d 73 74 72 69 6e |.print(t|rimstrin|
|000035e0| 67 28 78 29 29 3b 0d 20 | 20 20 20 20 20 65 6e 64 |g(x));. | end|
|000035f0| 2c 0d 20 20 20 20 5f 70 | 72 6f 74 6f 3a 20 70 72 |,. _p|roto: pr|
|00003600| 6f 74 6f 52 61 64 69 6f | 42 75 74 74 6f 6e 2c 0d |otoRadio|Button,.|
|00003610| 20 20 20 20 64 65 62 75 | 67 3a 20 22 70 6d 22 0d | debu|g: "pm".|
|00003620| 20 20 20 7d 3b 0d 0d 0d | 0d 0d 0d 0d 2f 2f 20 2d | };...|....// -|
|00003630| 2d 2d 2d 20 42 61 63 6b | 20 69 6e 20 46 69 6c 65 |--- Back| in File|
|00003640| 20 74 65 73 74 2e 74 20 | 2d 2d 2d 2d 0d 64 61 74 | test.t |----.dat|
|00003650| 65 54 69 6d 65 50 69 63 | 6b 65 72 20 3a 3d 20 2f |eTimePic|ker := /|
|00003660| 2a 20 63 68 69 6c 64 20 | 6f 66 20 6d 61 69 6e 20 |* child |of main |
|00003670| 2a 2f 0d 20 20 20 7b 5f | 70 72 6f 74 6f 3a 20 44 |*/. {_|proto: D|
|00003680| 61 74 65 54 69 6d 65 56 | 69 65 77 2c 20 64 65 62 |ateTimeV|iew, deb|
|00003690| 75 67 3a 20 22 64 61 74 | 65 54 69 6d 65 50 69 63 |ug: "dat|eTimePic|
|000036a0| 6b 65 72 22 7d 3b 0d 2f | 2f 20 56 69 65 77 20 64 |ker"};./|/ View d|
|000036b0| 61 74 65 54 69 6d 65 50 | 69 63 6b 65 72 20 69 73 |ateTimeP|icker is|
|000036c0| 20 64 65 63 6c 61 72 65 | 64 20 74 6f 20 6d 61 69 | declare|d to mai|
|000036d0| 6e 0d 0d 0d 0d 0d 2f 2f | 20 2d 2d 2d 2d 20 46 69 |n.....//| ---- Fi|
|000036e0| 6c 65 20 70 72 6f 74 6f | 44 61 74 65 45 64 69 74 |le proto|DateEdit|
|000036f0| 6f 72 49 6e 70 75 74 4c | 69 6e 65 20 2d 2d 2d 2d |orInputL|ine ----|
|00003700| 0d 64 61 74 65 45 64 69 | 74 6f 72 49 6e 70 75 74 |.dateEdi|torInput|
|00003710| 4c 69 6e 65 20 3a 3d 0d | 20 20 20 7b 76 69 65 77 |Line :=.| {view|
|00003720| 42 6f 75 6e 64 73 3a 20 | 7b 6c 65 66 74 3a 20 31 |Bounds: |{left: 1|
|00003730| 39 2c 20 74 6f 70 3a 20 | 36 34 2c 20 72 69 67 68 |9, top: |64, righ|
|00003740| 74 3a 20 2d 32 31 2c 20 | 62 6f 74 74 6f 6d 3a 20 |t: -21, |bottom: |
|00003750| 38 30 7d 2c 0d 20 20 20 | 20 76 69 65 77 4a 75 73 |80},. | viewJus|
|00003760| 74 69 66 79 3a 20 38 33 | 38 38 36 35 36 2c 0d 20 |tify: 83|88656,. |
|00003770| 20 20 20 6c 61 62 65 6c | 43 6f 6d 6d 61 6e 64 73 | label|Commands|
|00003780| 3a 20 5b 5d 2c 0d 20 20 | 20 20 6c 61 62 65 6c 43 |: [],. | labelC|
|00003790| 6c 69 63 6b 3a 0d 20 20 | 20 20 20 20 66 75 6e 63 |lick:. | func|
|000037a0| 28 75 6e 69 74 29 0d 20 | 20 20 20 20 20 62 65 67 |(unit). | beg|
|000037b0| 69 6e 0d 20 20 20 20 20 | 20 09 69 66 20 73 65 6c |in. | .if sel|
|000037c0| 66 3a 54 72 61 63 6b 48 | 69 6c 69 74 65 28 75 6e |f:TrackH|ilite(un|
|000037d0| 69 74 29 20 74 68 65 6e | 20 62 65 67 69 6e 0d 20 |it) then| begin. |
|000037e0| 20 20 20 20 20 09 09 69 | 66 20 56 69 73 69 62 6c | ..i|f Visibl|
|000037f0| 65 28 64 61 74 65 54 69 | 6d 65 50 69 63 6b 65 72 |e(dateTi|mePicker|
|00003800| 29 20 74 68 65 6e 20 0d | 20 20 20 20 20 20 09 09 |) then .| ..|
|00003810| 09 64 61 74 65 54 69 6d | 65 50 69 63 6b 65 72 3a |.dateTim|ePicker:|
|00003820| 43 6c 6f 73 65 28 29 3b | 0d 20 20 20 20 20 20 09 |Close();|. .|
|00003830| 09 2f 2f 20 49 20 64 69 | 64 6e 27 74 20 77 61 6e |.// I di|dn't wan|
|00003840| 74 20 74 6f 20 64 6f 20 | 74 68 69 73 2c 20 62 75 |t to do |this, bu|
|00003850| 74 20 74 6f 20 67 65 74 | 20 74 68 65 20 64 61 74 |t to get| the dat|
|00003860| 65 20 70 69 63 6b 65 72 | 20 74 6f 20 6f 70 65 6e |e picker| to open|
|00003870| 20 63 6f 72 72 65 63 74 | 6c 79 0d 20 20 20 20 20 | correct|ly. |
|00003880| 20 09 09 2f 2f 20 65 76 | 65 72 79 20 74 69 6d 65 | ..// ev|ery time|
|00003890| 20 49 20 6e 65 65 64 65 | 64 20 74 6f 20 64 6f 20 | I neede|d to do |
|000038a0| 74 68 65 20 64 65 66 65 | 72 72 65 64 20 61 63 74 |the defe|rred act|
|000038b0| 69 6f 6e 2e 20 0d 20 20 | 20 20 20 20 09 09 6c 6f |ion. . | ..lo|
|000038c0| 63 61 6c 20 6d 79 56 69 | 65 77 20 3a 3d 20 73 65 |cal myVi|ew := se|
|000038d0| 6c 66 3b 0d 20 20 20 20 | 20 20 09 09 41 64 64 44 |lf;. | ..AddD|
|000038e0| 65 66 65 72 72 65 64 41 | 63 74 69 6f 6e 28 66 75 |eferredA|ction(fu|
|000038f0| 6e 63 28 29 20 62 65 67 | 69 6e 0d 20 20 20 20 20 |nc() beg|in. |
|00003900| 20 09 09 09 09 09 2f 2f | 20 70 61 72 61 6d 73 20 | .....//| params |
|00003910| 74 6f 20 4f 70 65 6e 4d | 65 20 61 72 65 20 0d 20 |to OpenM|e are . |
|00003920| 20 20 20 20 20 09 09 09 | 09 09 2f 2f 09 09 09 28 | ...|..//...(|
|00003930| 74 68 65 20 76 69 65 77 | 20 74 68 61 74 20 67 65 |the view| that ge|
|00003940| 74 73 20 74 68 65 20 50 | 69 63 6b 65 64 44 61 74 |ts the P|ickedDat|
|00003950| 65 20 6d 65 73 73 61 67 | 65 2c 20 0d 20 20 20 20 |e messag|e, . |
|00003960| 20 20 09 09 09 09 09 2f | 2f 09 09 09 74 68 65 20 | ...../|/...the |
|00003970| 64 65 66 61 75 6c 74 20 | 64 61 74 65 20 74 6f 20 |default |date to |
|00003980| 73 68 6f 77 2c 20 61 6e | 64 20 0d 20 20 20 20 20 |show, an|d . |
|00003990| 20 09 09 09 09 09 2f 2f | 09 09 09 74 68 65 20 74 | .....//|...the t|
|000039a0| 69 74 6c 65 20 66 6f 72 | 20 74 68 65 20 64 61 74 |itle for| the dat|
|000039b0| 65 20 70 69 63 6b 65 72 | 20 76 69 65 77 29 0d 20 |e picker| view). |
|000039c0| 20 20 20 20 20 09 09 09 | 09 09 64 61 74 65 54 69 | ...|..dateTi|
|000039d0| 6d 65 50 69 63 6b 65 72 | 3a 4f 70 65 6e 4d 65 28 |mePicker|:OpenMe(|
|000039e0| 65 6e 74 72 79 4c 69 6e | 65 2c 20 65 6e 74 72 79 |entryLin|e, entry|
|000039f0| 4c 69 6e 65 2e 74 65 78 | 74 2c 20 6c 61 62 65 6c |Line.tex|t, label|
|00003a00| 29 3b 0d 20 20 20 20 20 | 20 09 09 09 09 09 6d 79 |);. | .....my|
|00003a10| 56 69 65 77 3a 48 69 6c | 69 74 65 28 6e 69 6c 29 |View:Hil|ite(nil)|
|00003a20| 3b 0d 20 20 20 20 20 20 | 09 09 09 09 65 6e 64 2c |;. |....end,|
|00003a30| 0d 20 20 20 20 20 20 09 | 09 09 09 27 5b 5d 29 3b |. .|...'[]);|
|00003a40| 0d 20 20 20 20 20 20 09 | 65 6e 64 3b 0d 20 20 20 |. .|end;. |
|00003a50| 20 20 20 09 72 65 74 75 | 72 6e 28 74 72 75 65 29 | .retu|rn(true)|
|00003a60| 3b 20 2f 2f 20 73 61 79 | 20 49 20 68 61 6e 64 6c |; // say| I handl|
|00003a70| 65 64 20 74 68 65 20 63 | 6c 69 63 6b 2e 0d 20 20 |ed the c|lick.. |
|00003a80| 20 20 20 20 65 6e 64 2c | 0d 20 20 20 20 6c 61 62 | end,|. lab|
|00003a90| 65 6c 3a 20 22 44 61 74 | 65 22 2c 0d 20 20 20 20 |el: "Dat|e",. |
|00003aa0| 65 6e 74 72 79 46 6c 61 | 67 73 3a 20 35 33 39 31 |entryFla|gs: 5391|
|00003ab0| 33 37 2c 0d 20 20 20 20 | 44 61 74 65 3a 20 6e 69 |37,. |Date: ni|
|00003ac0| 6c 2c 0d 20 20 20 20 74 | 65 78 74 53 65 74 75 70 |l,. t|extSetup|
|00003ad0| 3a 0d 20 20 20 20 20 20 | 66 75 6e 63 28 29 0d 20 |:. |func(). |
|00003ae0| 20 20 20 20 20 09 3a 74 | 65 78 74 46 6f 72 6d 61 | .:t|extForma|
|00003af0| 74 28 64 61 74 65 29 3b | 2c 0d 20 20 20 20 76 69 |t(date);|,. vi|
|00003b00| 65 77 53 65 74 75 70 44 | 6f 6e 65 53 63 72 69 70 |ewSetupD|oneScrip|
|00003b10| 74 3a 0d 20 20 20 20 20 | 20 66 75 6e 63 28 29 0d |t:. | func().|
|00003b20| 20 20 20 20 20 20 62 65 | 67 69 6e 0d 20 20 20 20 | be|gin. |
|00003b30| 20 20 09 53 65 74 56 61 | 6c 75 65 28 65 6e 74 72 | .SetVa|lue(entr|
|00003b40| 79 4c 69 6e 65 2c 27 76 | 69 65 77 46 6f 6e 74 2c |yLine,'v|iewFont,|
|00003b50| 75 73 65 72 46 6f 6e 74 | 31 30 29 3b 0d 20 20 20 |userFont|10);. |
|00003b60| 20 20 20 09 69 66 20 56 | 69 73 69 62 6c 65 28 64 | .if V|isible(d|
|00003b70| 61 74 65 54 69 6d 65 50 | 69 63 6b 65 72 29 20 74 |ateTimeP|icker) t|
|00003b80| 68 65 6e 20 64 61 74 65 | 54 69 6d 65 50 69 63 6b |hen date|TimePick|
|00003b90| 65 72 3a 55 70 64 61 74 | 65 28 65 6e 74 72 79 4c |er:Updat|e(entryL|
|00003ba0| 69 6e 65 2c 20 65 6e 74 | 72 79 4c 69 6e 65 2e 74 |ine, ent|ryLine.t|
|00003bb0| 65 78 74 2c 20 6c 61 62 | 65 6c 29 3b 0d 20 20 20 |ext, lab|el);. |
|00003bc0| 20 20 20 65 6e 64 2c 0d | 20 20 20 20 50 69 63 6b | end,.| Pick|
|00003bd0| 65 64 44 61 74 65 3a 0d | 20 20 20 20 20 20 66 75 |edDate:.| fu|
|00003be0| 6e 63 28 69 6e 74 65 72 | 6e 61 6c 44 61 74 65 29 |nc(inter|nalDate)|
|00003bf0| 20 0d 20 20 20 20 20 20 | 2f 2f 20 69 73 20 63 61 | . |// is ca|
|00003c00| 6c 6c 65 64 20 62 79 20 | 64 61 74 65 70 69 63 6b |lled by |datepick|
|00003c10| 65 72 20 77 68 65 6e 20 | 75 73 65 72 20 74 61 70 |er when |user tap|
|00003c20| 73 20 22 73 65 74 22 20 | 79 6f 75 20 6d 75 73 74 |s "set" |you must|
|00003c30| 20 70 72 6f 63 65 73 73 | 20 0d 20 20 20 20 20 20 | process| . |
|00003c40| 2f 2f 20 74 68 65 20 69 | 6e 74 65 72 6e 61 6c 20 |// the i|nternal |
|00003c50| 64 61 74 65 20 70 61 73 | 73 65 64 20 74 6f 20 79 |date pas|sed to y|
|00003c60| 6f 75 20 61 6e 64 20 64 | 69 73 70 6c 61 79 20 69 |ou and d|isplay i|
|00003c70| 74 0d 20 20 20 20 20 20 | 62 65 67 69 6e 0d 20 20 |t. |begin. |
|00003c80| 20 20 20 20 09 44 61 74 | 65 20 3a 3d 20 69 6e 74 | .Dat|e := int|
|00003c90| 65 72 6e 61 6c 44 61 74 | 65 3b 0d 20 20 20 20 20 |ernalDat|e;. |
|00003ca0| 20 09 53 65 74 56 61 6c | 75 65 28 65 6e 74 72 79 | .SetVal|ue(entry|
|00003cb0| 6c 69 6e 65 2c 27 74 65 | 78 74 2c 3a 74 65 78 74 |line,'te|xt,:text|
|00003cc0| 46 6f 72 6d 61 74 28 44 | 61 74 65 29 29 3b 0d 20 |Format(D|ate));. |
|00003cd0| 20 20 20 20 20 65 6e 64 | 2c 0d 20 20 20 20 74 65 | end|,. te|
|00003ce0| 78 74 46 6f 72 6d 61 74 | 3a 0d 20 20 20 20 20 20 |xtFormat|:. |
|00003cf0| 66 75 6e 63 28 64 75 68 | 44 61 74 65 29 0d 20 20 |func(duh|Date). |
|00003d00| 20 20 20 20 09 69 66 20 | 64 75 68 44 61 74 65 20 | .if |duhDate |
|00003d10| 74 68 65 6e 0d 20 20 20 | 20 20 20 09 09 4c 6f 6e |then. | ..Lon|
|00003d20| 67 44 61 74 65 53 74 72 | 28 64 75 68 44 61 74 65 |gDateStr|(duhDate|
|00003d30| 2c 6b 44 61 74 65 46 6f | 72 6d 61 74 29 3b 20 0d |,kDateFo|rmat); .|
|00003d40| 20 20 20 20 20 20 09 65 | 6c 73 65 0d 20 20 20 20 | .e|lse. |
|00003d50| 20 20 09 09 22 22 3b 2c | 0d 20 20 20 20 76 69 65 | .."";,|. vie|
|00003d60| 77 53 65 74 75 70 46 6f | 72 6d 53 63 72 69 70 74 |wSetupFo|rmScript|
|00003d70| 3a 0d 20 20 20 20 20 20 | 66 75 6e 63 28 29 20 2f |:. |func() /|
|00003d80| 2f 20 49 20 74 68 69 6e | 6b 20 49 27 6d 20 75 73 |/ I thin|k I'm us|
|00003d90| 69 6e 67 20 74 68 69 73 | 20 69 6e 20 6d 79 20 70 |ing this| in my p|
|00003da0| 72 6f 6a 65 63 74 20 74 | 68 61 74 27 73 20 77 68 |roject t|hat's wh|
|00003db0| 79 20 69 74 20 69 73 20 | 68 65 72 65 2e 20 59 6f |y it is |here. Yo|
|00003dc0| 75 20 63 61 6e 20 64 65 | 6c 65 74 65 20 69 74 2e |u can de|lete it.|
|00003dd0| 0d 20 20 20 20 20 20 62 | 65 67 69 6e 0d 20 20 20 |. b|egin. |
|00003de0| 20 20 20 2f 2f 09 64 61 | 74 65 20 3a 3d 20 66 69 | //.da|te := fi|
|00003df0| 6c 74 65 72 46 72 6f 6d | 44 61 74 65 3b 0d 20 20 |lterFrom|Date;. |
|00003e00| 20 20 20 20 65 6e 64 2c | 0d 20 20 20 20 76 69 65 | end,|. vie|
|00003e10| 77 6c 69 6e 65 73 70 61 | 63 69 6e 67 3a 20 31 32 |wlinespa|cing: 12|
|00003e20| 2c 0d 20 20 20 20 74 65 | 78 74 43 68 61 6e 67 65 |,. te|xtChange|
|00003e30| 64 3a 0d 20 20 20 20 20 | 20 66 75 6e 63 28 29 0d |d:. | func().|
|00003e40| 20 20 20 20 20 20 09 69 | 66 20 4e 4f 54 20 74 65 | .i|f NOT te|
|00003e50| 78 74 20 4f 52 20 53 74 | 72 4c 65 6e 28 74 65 78 |xt OR St|rLen(tex|
|00003e60| 74 29 20 3d 20 30 20 74 | 68 65 6e 20 0d 20 20 20 |t) = 0 t|hen . |
|00003e70| 20 20 20 09 09 64 61 74 | 65 20 3a 3d 20 6e 69 6c | ..dat|e := nil|
|00003e80| 3b 0d 20 20 20 20 20 20 | 09 65 6c 73 65 0d 20 20 |;. |.else. |
|00003e90| 20 20 20 20 09 09 64 61 | 74 65 20 3a 3d 20 53 74 | ..da|te := St|
|00003ea0| 72 69 6e 67 54 6f 44 61 | 74 65 28 54 72 69 6d 53 |ringToDa|te(TrimS|
|00003eb0| 74 72 69 6e 67 28 74 65 | 78 74 29 29 3b 2c 0d 20 |tring(te|xt));,. |
|00003ec0| 20 20 20 5f 70 72 6f 74 | 6f 3a 20 70 72 6f 74 6f | _prot|o: proto|
|00003ed0| 4c 61 62 65 6c 49 6e 70 | 75 74 4c 69 6e 65 2c 0d |LabelInp|utLine,.|
|00003ee0| 20 20 20 20 64 65 62 75 | 67 3a 20 22 64 61 74 65 | debu|g: "date|
|00003ef0| 45 64 69 74 6f 72 49 6e | 70 75 74 4c 69 6e 65 22 |EditorIn|putLine"|
|00003f00| 0d 20 20 20 7d 3b 0d 0d | 0d 2f 2f 20 2d 2d 2d 2d |. };..|.// ----|
|00003f10| 20 42 61 63 6b 20 69 6e | 20 46 69 6c 65 20 74 65 | Back in| File te|
|00003f20| 73 74 2e 74 20 2d 2d 2d | 2d 0d 44 61 74 65 54 69 |st.t ---|-.DateTi|
|00003f30| 6d 65 49 6e 70 75 74 4c | 69 6e 65 20 3a 3d 20 2f |meInputL|ine := /|
|00003f40| 2a 20 63 68 69 6c 64 20 | 6f 66 20 6d 61 69 6e 20 |* child |of main |
|00003f50| 2a 2f 0d 20 20 20 7b 76 | 69 65 77 42 6f 75 6e 64 |*/. {v|iewBound|
|00003f60| 73 3a 20 7b 6c 65 66 74 | 3a 20 39 2c 20 74 6f 70 |s: {left|: 9, top|
|00003f70| 3a 20 32 35 33 2c 20 72 | 69 67 68 74 3a 20 32 32 |: 253, r|ight: 22|
|00003f80| 32 2c 20 62 6f 74 74 6f | 6d 3a 20 32 37 33 7d 2c |2, botto|m: 273},|
|00003f90| 0d 20 20 20 20 76 69 65 | 77 4a 75 73 74 69 66 79 |. vie|wJustify|
|00003fa0| 3a 20 38 33 38 38 36 30 | 38 2c 0d 20 20 20 20 74 |: 838860|8,. t|
|00003fb0| 65 78 74 46 6f 72 6d 61 | 74 3a 0d 20 20 20 20 20 |extForma|t:. |
|00003fc0| 20 66 75 6e 63 28 64 75 | 68 44 61 74 65 29 0d 20 | func(du|hDate). |
|00003fd0| 20 20 20 20 20 09 69 66 | 20 64 75 68 44 61 74 65 | .if| duhDate|
|00003fe0| 20 74 68 65 6e 0d 20 20 | 20 20 20 20 09 09 44 61 | then. | ..Da|
|00003ff0| 74 65 4e 54 69 6d 65 28 | 64 75 68 44 61 74 65 29 |teNTime(|duhDate)|
|00004000| 3b 0d 20 20 20 20 20 20 | 09 65 6c 73 65 0d 20 20 |;. |.else. |
|00004010| 20 20 20 20 09 09 22 22 | 3b 2c 0d 20 20 20 20 6c | ..""|;,. l|
|00004020| 61 62 65 6c 3a 20 22 44 | 61 74 65 20 26 20 54 69 |abel: "D|ate & Ti|
|00004030| 6d 65 22 2c 0d 20 20 20 | 20 5f 70 72 6f 74 6f 3a |me",. | _proto:|
|00004040| 20 64 61 74 65 45 64 69 | 74 6f 72 49 6e 70 75 74 | dateEdi|torInput|
|00004050| 4c 69 6e 65 2c 0d 20 20 | 20 20 64 65 62 75 67 3a |Line,. | debug:|
|00004060| 20 22 44 61 74 65 54 69 | 6d 65 49 6e 70 75 74 4c | "DateTi|meInputL|
|00004070| 69 6e 65 22 0d 20 20 20 | 7d 3b 0d 0d 0d 0d 44 61 |ine". |};....Da|
|00004080| 74 65 49 6e 70 75 74 4c | 69 6e 65 20 3a 3d 20 2f |teInputL|ine := /|
|00004090| 2a 20 63 68 69 6c 64 20 | 6f 66 20 6d 61 69 6e 20 |* child |of main |
|000040a0| 2a 2f 0d 20 20 20 7b 76 | 69 65 77 42 6f 75 6e 64 |*/. {v|iewBound|
|000040b0| 73 3a 20 7b 6c 65 66 74 | 3a 20 39 2c 20 74 6f 70 |s: {left|: 9, top|
|000040c0| 3a 20 32 33 33 2c 20 72 | 69 67 68 74 3a 20 32 32 |: 233, r|ight: 22|
|000040d0| 32 2c 20 62 6f 74 74 6f | 6d 3a 20 32 35 33 7d 2c |2, botto|m: 253},|
|000040e0| 0d 20 20 20 20 76 69 65 | 77 4a 75 73 74 69 66 79 |. vie|wJustify|
|000040f0| 3a 20 38 33 38 38 36 30 | 38 2c 0d 20 20 20 20 6c |: 838860|8,. l|
|00004100| 61 62 65 6c 43 6c 69 63 | 6b 3a 0d 20 20 20 20 20 |abelClic|k:. |
|00004110| 20 66 75 6e 63 28 75 6e | 69 74 29 20 20 2f 2f 63 | func(un|it) //c|
|00004120| 68 61 6e 67 65 64 20 64 | 61 74 65 54 69 6d 65 50 |hanged d|ateTimeP|
|00004130| 69 63 6b 65 72 20 74 6f | 20 64 61 74 65 50 69 63 |icker to| datePic|
|00004140| 6b 65 72 0d 20 20 20 20 | 20 20 62 65 67 69 6e 0d |ker. | begin.|
|00004150| 20 20 20 20 20 20 09 69 | 66 20 73 65 6c 66 3a 54 | .i|f self:T|
|00004160| 72 61 63 6b 48 69 6c 69 | 74 65 28 75 6e 69 74 29 |rackHili|te(unit)|
|00004170| 20 74 68 65 6e 20 62 65 | 67 69 6e 0d 20 20 20 20 | then be|gin. |
|00004180| 20 20 09 09 69 66 20 56 | 69 73 69 62 6c 65 28 64 | ..if V|isible(d|
|00004190| 61 74 65 50 69 63 6b 65 | 72 29 20 74 68 65 6e 20 |atePicke|r) then |
|000041a0| 0d 20 20 20 20 20 20 09 | 09 09 64 61 74 65 50 69 |. .|..datePi|
|000041b0| 63 6b 65 72 3a 43 6c 6f | 73 65 28 29 3b 0d 20 20 |cker:Clo|se();. |
|000041c0| 20 20 20 20 09 09 2f 2f | 20 49 20 64 69 64 6e 27 | ..//| I didn'|
|000041d0| 74 20 77 61 6e 74 20 74 | 6f 20 64 6f 20 74 68 69 |t want t|o do thi|
|000041e0| 73 2c 20 62 75 74 20 74 | 6f 20 67 65 74 20 74 68 |s, but t|o get th|
|000041f0| 65 20 64 61 74 65 20 70 | 69 63 6b 65 72 20 74 6f |e date p|icker to|
|00004200| 20 6f 70 65 6e 20 63 6f | 72 72 65 63 74 6c 79 0d | open co|rrectly.|
|00004210| 20 20 20 20 20 20 09 09 | 2f 2f 20 65 76 65 72 79 | ..|// every|
|00004220| 20 74 69 6d 65 20 49 20 | 6e 65 65 64 65 64 20 74 | time I |needed t|
|00004230| 6f 20 64 6f 20 74 68 65 | 20 64 65 66 65 72 72 65 |o do the| deferre|
|00004240| 64 20 61 63 74 69 6f 6e | 2e 20 54 68 65 20 64 72 |d action|. The dr|
|00004250| 61 77 62 61 63 6b 20 69 | 73 20 74 68 61 74 20 74 |awback i|s that t|
|00004260| 68 65 0d 20 20 20 20 20 | 20 09 09 2f 2f 20 62 75 |he. | ..// bu|
|00004270| 74 74 6f 6e 20 69 73 20 | 75 6e 68 69 6c 69 74 65 |tton is |unhilite|
|00004280| 64 20 72 69 67 68 74 20 | 61 77 61 79 0d 20 20 20 |d right |away. |
|00004290| 20 20 20 09 09 6c 6f 63 | 61 6c 20 6d 79 56 69 65 | ..loc|al myVie|
|000042a0| 77 20 3a 3d 20 73 65 6c | 66 3b 0d 20 20 20 20 20 |w := sel|f;. |
|000042b0| 20 09 09 41 64 64 44 65 | 66 65 72 72 65 64 41 63 | ..AddDe|ferredAc|
|000042c0| 74 69 6f 6e 28 66 75 6e | 63 28 29 20 62 65 67 69 |tion(fun|c() begi|
|000042d0| 6e 0d 20 20 20 20 20 20 | 09 09 09 09 09 2f 2f 20 |n. |.....// |
|000042e0| 70 61 72 61 6d 73 20 74 | 6f 20 4f 70 65 6e 4d 65 |params t|o OpenMe|
|000042f0| 20 61 72 65 20 0d 20 20 | 20 20 20 20 09 09 09 09 | are . | ....|
|00004300| 09 2f 2f 09 09 09 28 74 | 68 65 20 76 69 65 77 20 |.//...(t|he view |
|00004310| 74 68 61 74 20 67 65 74 | 73 20 74 68 65 20 50 69 |that get|s the Pi|
|00004320| 63 6b 65 64 44 61 74 65 | 20 6d 65 73 73 61 67 65 |ckedDate| message|
|00004330| 2c 20 0d 20 20 20 20 20 | 20 09 09 09 09 09 2f 2f |, . | .....//|
|00004340| 09 09 09 74 68 65 20 64 | 65 66 61 75 6c 74 20 64 |...the d|efault d|
|00004350| 61 74 65 20 74 6f 20 73 | 68 6f 77 2c 20 61 6e 64 |ate to s|how, and|
|00004360| 20 0d 20 20 20 20 20 20 | 09 09 09 09 09 2f 2f 09 | . |.....//.|
|00004370| 09 09 74 68 65 20 74 69 | 74 6c 65 20 66 6f 72 20 |..the ti|tle for |
|00004380| 74 68 65 20 64 61 74 65 | 20 70 69 63 6b 65 72 20 |the date| picker |
|00004390| 76 69 65 77 29 0d 20 20 | 20 20 20 20 09 09 09 09 |view). | ....|
|000043a0| 09 64 61 74 65 50 69 63 | 6b 65 72 3a 4f 70 65 6e |.datePic|ker:Open|
|000043b0| 4d 65 28 65 6e 74 72 79 | 4c 69 6e 65 2c 20 65 6e |Me(entry|Line, en|
|000043c0| 74 72 79 4c 69 6e 65 2e | 74 65 78 74 2c 20 6c 61 |tryLine.|text, la|
|000043d0| 62 65 6c 29 3b 0d 20 20 | 20 20 20 20 09 09 09 09 |bel);. | ....|
|000043e0| 09 6d 79 56 69 65 77 3a | 48 69 6c 69 74 65 28 6e |.myView:|Hilite(n|
|000043f0| 69 6c 29 3b 20 0d 20 20 | 20 20 20 20 09 09 09 09 |il); . | ....|
|00004400| 65 6e 64 2c 0d 20 20 20 | 20 20 20 09 09 09 09 27 |end,. | ....'|
|00004410| 5b 5d 29 3b 0d 20 20 20 | 20 20 20 09 65 6e 64 3b |[]);. | .end;|
|00004420| 0d 20 20 20 20 20 20 09 | 72 65 74 75 72 6e 28 74 |. .|return(t|
|00004430| 72 75 65 29 3b 20 2f 2f | 20 73 61 79 20 49 20 68 |rue); //| say I h|
|00004440| 61 6e 64 6c 65 64 20 74 | 68 65 20 63 6c 69 63 6b |andled t|he click|
|00004450| 2e 0d 20 20 20 20 20 20 | 65 6e 64 2c 0d 20 20 20 |.. |end,. |
|00004460| 20 76 69 65 77 53 65 74 | 75 70 44 6f 6e 65 53 63 | viewSet|upDoneSc|
|00004470| 72 69 70 74 3a 0d 20 20 | 20 20 20 20 66 75 6e 63 |ript:. | func|
|00004480| 28 29 0d 20 20 20 20 20 | 20 62 65 67 69 6e 0d 20 |(). | begin. |
|00004490| 20 20 20 20 20 09 53 65 | 74 56 61 6c 75 65 28 65 | .Se|tValue(e|
|000044a0| 6e 74 72 79 4c 69 6e 65 | 2c 27 76 69 65 77 46 6f |ntryLine|,'viewFo|
|000044b0| 6e 74 2c 75 73 65 72 46 | 6f 6e 74 31 30 29 3b 0d |nt,userF|ont10);.|
|000044c0| 20 20 20 20 20 20 09 69 | 66 20 56 69 73 69 62 6c | .i|f Visibl|
|000044d0| 65 28 64 61 74 65 50 69 | 63 6b 65 72 29 20 74 68 |e(datePi|cker) th|
|000044e0| 65 6e 20 64 61 74 65 50 | 69 63 6b 65 72 3a 55 70 |en dateP|icker:Up|
|000044f0| 64 61 74 65 28 65 6e 74 | 72 79 4c 69 6e 65 2c 20 |date(ent|ryLine, |
|00004500| 65 6e 74 72 79 4c 69 6e | 65 2e 74 65 78 74 2c 20 |entryLin|e.text, |
|00004510| 6c 61 62 65 6c 29 3b 20 | 0d 20 20 20 20 20 20 65 |label); |. e|
|00004520| 6e 64 2c 0d 20 20 20 20 | 5f 70 72 6f 74 6f 3a 20 |nd,. |_proto: |
|00004530| 64 61 74 65 45 64 69 74 | 6f 72 49 6e 70 75 74 4c |dateEdit|orInputL|
|00004540| 69 6e 65 2c 0d 20 20 20 | 20 64 65 62 75 67 3a 20 |ine,. | debug: |
|00004550| 22 44 61 74 65 49 6e 70 | 75 74 4c 69 6e 65 22 0d |"DateInp|utLine".|
|00004560| 20 20 20 7d 3b 0d 0d 0d | 0d 0d 2f 2f 20 2d 2d 2d | };...|..// ---|
|00004570| 2d 20 46 69 6c 65 20 70 | 72 6f 74 6f 44 61 74 65 |- File p|rotoDate|
|00004580| 50 69 63 6b 65 72 50 69 | 63 6b 65 72 20 2d 2d 2d |PickerPi|cker ---|
|00004590| 2d 0d 44 61 74 65 54 69 | 6d 65 56 69 65 77 20 3a |-.DateTi|meView :|
|000045a0| 3d 0d 20 20 20 7b 76 69 | 65 77 42 6f 75 6e 64 73 |=. {vi|ewBounds|
|000045b0| 3a 20 7b 6c 65 66 74 3a | 20 30 2c 20 74 6f 70 3a |: {left:| 0, top:|
|000045c0| 20 30 2c 20 72 69 67 68 | 74 3a 20 31 33 35 2c 20 | 0, righ|t: 135, |
|000045d0| 62 6f 74 74 6f 6d 3a 20 | 31 33 33 7d 2c 0d 20 20 |bottom: |133},. |
|000045e0| 20 20 4f 70 65 6e 4d 65 | 3a 0d 20 20 20 20 20 20 | OpenMe|:. |
|000045f0| 66 75 6e 63 28 72 65 74 | 75 72 6e 56 69 65 77 2c |func(ret|urnView,|
|00004600| 20 6d 79 44 61 74 65 2c | 20 6d 79 54 69 74 6c 65 | myDate,| myTitle|
|00004610| 29 0d 20 20 20 20 20 20 | 62 65 67 69 6e 0d 20 20 |). |begin. |
|00004620| 20 20 20 20 09 73 65 6c | 66 2e 76 69 65 77 54 6f | .sel|f.viewTo|
|00004630| 53 65 74 20 3a 3d 20 72 | 65 74 75 72 6e 56 69 65 |Set := r|eturnVie|
|00004640| 77 3b 0d 20 20 20 20 20 | 20 09 73 65 6c 66 2e 74 |w;. | .self.t|
|00004650| 68 65 44 61 74 65 3a 3d | 20 6d 79 44 61 74 65 3b |heDate:=| myDate;|
|00004660| 0d 20 20 20 20 20 20 09 | 73 65 6c 66 2e 74 68 65 |. .|self.the|
|00004670| 54 69 74 6c 65 20 3a 3d | 20 6d 79 54 69 74 6c 65 |Title :=| myTitle|
|00004680| 3b 0d 20 20 20 20 20 20 | 09 73 65 6c 66 3a 4f 70 |;. |.self:Op|
|00004690| 65 6e 28 29 3b 0d 20 20 | 20 20 20 20 2f 2f 09 70 |en();. | //.p|
|000046a0| 72 69 6e 74 28 22 4f 70 | 65 6e 20 6d 65 20 64 6f |rint("Op|en me do|
|000046b0| 6e 65 22 29 0d 20 20 20 | 20 20 20 65 6e 64 2c 0d |ne"). | end,.|
|000046c0| 20 20 20 20 73 65 6c 65 | 63 74 65 64 44 61 74 65 | sele|ctedDate|
|000046d0| 73 3a 20 5b 5d 2c 0d 20 | 20 20 20 74 68 65 44 61 |s: [],. | theDa|
|000046e0| 74 65 3a 20 6e 69 6c 2c | 0d 20 20 20 20 74 68 65 |te: nil,|. the|
|000046f0| 54 69 74 6c 65 3a 20 22 | 74 65 73 74 22 2c 0d 20 |Title: "|test",. |
|00004700| 20 20 20 74 69 74 6c 65 | 3a 20 22 63 6c 4d 6f 6e | title|: "clMon|
|00004710| 74 68 56 69 65 77 20 53 | 61 6d 70 6c 65 22 2c 0d |thView S|ample",.|
|00004720| 20 20 20 20 76 69 65 77 | 53 65 74 75 70 46 6f 72 | view|SetupFor|
|00004730| 6d 53 63 72 69 70 74 3a | 0d 20 20 20 20 20 20 66 |mScript:|. f|
|00004740| 75 6e 63 28 29 0d 20 20 | 20 20 20 20 62 65 67 69 |unc(). | begi|
|00004750| 6e 0d 20 20 20 20 20 20 | 0d 20 20 20 20 20 20 09 |n. |. .|
|00004760| 69 66 20 6e 6f 74 20 74 | 68 65 44 61 74 65 20 6f |if not t|heDate o|
|00004770| 72 20 6e 6f 74 20 53 74 | 72 69 6e 67 54 6f 44 61 |r not St|ringToDa|
|00004780| 74 65 28 74 68 65 44 61 | 74 65 29 20 74 68 65 6e |te(theDa|te) then|
|00004790| 20 0d 20 20 20 20 20 20 | 09 09 74 68 65 44 61 74 | . |..theDat|
|000047a0| 65 3a 3d 20 74 69 6d 65 | 28 29 3b 0d 20 20 20 20 |e:= time|();. |
|000047b0| 20 20 09 65 6c 73 65 0d | 20 20 20 20 20 20 09 09 | .else.| ..|
|000047c0| 74 68 65 44 61 74 65 20 | 3a 3d 20 53 74 72 69 6e |theDate |:= Strin|
|000047d0| 67 54 6f 44 61 74 65 28 | 74 68 65 44 61 74 65 29 |gToDate(|theDate)|
|000047e0| 3b 0d 20 20 20 20 20 20 | 09 0d 20 20 20 20 20 20 |;. |.. |
|000047f0| 09 73 65 6c 65 63 74 65 | 64 44 61 74 65 73 20 3a |.selecte|dDates :|
|00004800| 3d 20 5b 74 68 65 44 61 | 74 65 5d 3b 0d 20 20 20 |= [theDa|te];. |
|00004810| 20 20 20 09 0d 20 20 20 | 20 20 20 09 73 65 74 76 | .. | .setv|
|00004820| 61 6c 75 65 28 70 69 63 | 6b 65 72 54 69 74 6c 65 |alue(pic|kerTitle|
|00004830| 2c 20 27 74 69 74 6c 65 | 2c 20 74 68 65 54 69 74 |, 'title|, theTit|
|00004840| 6c 65 29 3b 0d 20 20 20 | 20 20 20 09 0d 20 20 20 |le);. | .. |
|00004850| 20 20 20 65 6e 64 2c 0d | 20 20 20 20 76 69 65 77 | end,.| view|
|00004860| 54 6f 53 65 74 3a 20 6e | 69 6c 2c 0d 20 20 20 20 |ToSet: n|il,. |
|00004870| 64 65 63 6c 61 72 65 53 | 65 6c 66 3a 20 27 62 61 |declareS|elf: 'ba|
|00004880| 73 65 2c 0d 20 20 20 20 | 55 70 64 61 74 65 3a 0d |se,. |Update:.|
|00004890| 20 20 20 20 20 20 66 75 | 6e 63 28 72 65 74 75 72 | fu|nc(retur|
|000048a0| 6e 56 69 65 77 2c 20 6d | 79 44 61 74 65 2c 20 6d |nView, m|yDate, m|
|000048b0| 79 54 69 74 6c 65 29 0d | 20 20 20 20 20 20 62 65 |yTitle).| be|
|000048c0| 67 69 6e 0d 20 20 20 20 | 20 20 09 73 65 6c 66 2e |gin. | .self.|
|000048d0| 76 69 65 77 54 6f 53 65 | 74 20 3a 3d 20 72 65 74 |viewToSe|t := ret|
|000048e0| 75 72 6e 56 69 65 77 3b | 0d 20 20 20 20 20 20 09 |urnView;|. .|
|000048f0| 73 65 6c 66 2e 74 68 65 | 44 61 74 65 3a 3d 20 6d |self.the|Date:= m|
|00004900| 79 44 61 74 65 3b 0d 20 | 20 20 20 20 20 09 73 65 |yDate;. | .se|
|00004910| 6c 66 2e 74 68 65 54 69 | 74 6c 65 20 3a 3d 20 6d |lf.theTi|tle := m|
|00004920| 79 54 69 74 6c 65 3b 0d | 20 20 20 20 20 20 2f 2f |yTitle;.| //|
|00004930| 09 73 65 6c 66 3a 76 69 | 65 77 53 65 74 55 70 46 |.self:vi|ewSetUpF|
|00004940| 6f 72 6d 53 63 72 69 70 | 74 28 29 3b 0d 20 20 20 |ormScrip|t();. |
|00004950| 20 20 20 09 69 66 20 6e | 6f 74 20 74 68 65 44 61 | .if n|ot theDa|
|00004960| 74 65 20 6f 72 20 6e 6f | 74 20 53 74 72 69 6e 67 |te or no|t String|
|00004970| 54 6f 44 61 74 65 28 74 | 68 65 44 61 74 65 29 20 |ToDate(t|heDate) |
|00004980| 74 68 65 6e 20 0d 20 20 | 20 20 20 20 09 09 74 68 |then . | ..th|
|00004990| 65 44 61 74 65 3a 3d 20 | 74 69 6d 65 28 29 3b 0d |eDate:= |time();.|
|000049a0| 20 20 20 20 20 20 09 65 | 6c 73 65 0d 20 20 20 20 | .e|lse. |
|000049b0| 20 20 09 09 74 68 65 44 | 61 74 65 20 3a 3d 20 53 | ..theD|ate := S|
|000049c0| 74 72 69 6e 67 54 6f 44 | 61 74 65 28 74 68 65 44 |tringToD|ate(theD|
|000049d0| 61 74 65 29 3b 0d 20 20 | 20 20 20 20 09 0d 20 20 |ate);. | .. |
|000049e0| 20 20 20 20 09 73 65 6c | 65 63 74 65 64 44 61 74 | .sel|ectedDat|
|000049f0| 65 73 20 3a 3d 20 5b 74 | 68 65 44 61 74 65 5d 3b |es := [t|heDate];|
|00004a00| 0d 20 20 20 20 20 20 0d | 20 20 20 20 20 20 09 73 |. .| .s|
|00004a10| 65 74 76 61 6c 75 65 28 | 70 69 63 6b 65 72 54 69 |etvalue(|pickerTi|
|00004a20| 74 6c 65 2c 20 27 74 69 | 74 6c 65 2c 20 74 68 65 |tle, 'ti|tle, the|
|00004a30| 54 69 74 6c 65 29 3b 0d | 20 20 20 20 20 20 0d 20 |Title);.| . |
|00004a40| 20 20 20 20 20 09 64 61 | 74 65 50 69 63 6b 65 72 | .da|tePicker|
|00004a50| 3a 52 65 66 72 65 73 68 | 28 29 3b 0d 20 20 20 20 |:Refresh|();. |
|00004a60| 20 20 09 70 72 69 6e 74 | 28 22 64 61 74 65 74 69 | .print|("dateti|
|00004a70| 6d 65 20 75 70 64 61 74 | 65 64 22 29 0d 20 20 20 |me updat|ed"). |
|00004a80| 20 20 20 65 6e 64 2c 0d | 20 20 20 20 41 75 74 6f | end,.| Auto|
|00004a90| 43 6c 6f 73 65 3a 20 54 | 72 75 65 2c 0d 20 20 20 |Close: T|rue,. |
|00004aa0| 20 5f 70 72 6f 74 6f 3a | 20 5f 75 73 65 72 70 72 | _proto:| _userpr|
|00004ab0| 6f 74 6f 30 30 30 2c 0d | 20 20 20 20 64 65 62 75 |oto000,.| debu|
|00004ac0| 67 3a 20 22 44 61 74 65 | 54 69 6d 65 56 69 65 77 |g: "Date|TimeView|
|00004ad0| 22 0d 20 20 20 7d 3b 0d | 0d 64 61 74 65 50 69 63 |". };.|.datePic|
|00004ae0| 6b 65 72 20 3a 3d 20 2f | 2a 20 63 68 69 6c 64 20 |ker := /|* child |
|00004af0| 6f 66 20 44 61 74 65 54 | 69 6d 65 56 69 65 77 20 |of DateT|imeView |
|00004b00| 2a 2f 0d 20 20 20 7b 76 | 69 65 77 42 6f 75 6e 64 |*/. {v|iewBound|
|00004b10| 73 3a 20 7b 6c 65 66 74 | 3a 20 37 2c 20 74 6f 70 |s: {left|: 7, top|
|00004b20| 3a 20 32 32 2c 20 72 69 | 67 68 74 3a 20 31 32 37 |: 22, ri|ght: 127|
|00004b30| 2c 20 62 6f 74 74 6f 6d | 3a 20 31 31 30 7d 2c 0d |, bottom|: 110},.|
|00004b40| 20 20 20 20 76 69 65 77 | 46 6f 72 6d 61 74 3a 20 | view|Format: |
|00004b50| 33 33 36 2c 0d 20 20 20 | 20 5f 70 72 6f 74 6f 3a |336,. | _proto:|
|00004b60| 20 70 72 6f 74 6f 44 61 | 74 65 50 69 63 6b 65 72 | protoDa|tePicker|
|00004b70| 2c 0d 20 20 20 20 64 65 | 62 75 67 3a 20 22 64 61 |,. de|bug: "da|
|00004b80| 74 65 50 69 63 6b 65 72 | 22 0d 20 20 20 7d 3b 0d |tePicker|". };.|
|00004b90| 2f 2f 20 56 69 65 77 20 | 64 61 74 65 50 69 63 6b |// View |datePick|
|00004ba0| 65 72 20 69 73 20 64 65 | 63 6c 61 72 65 64 20 74 |er is de|clared t|
|00004bb0| 6f 20 44 61 74 65 54 69 | 6d 65 56 69 65 77 0d 0d |o DateTi|meView..|
|00004bc0| 0d 0d 5f 76 69 65 77 30 | 30 32 20 3a 3d 20 2f 2a |.._view0|02 := /*|
|00004bd0| 20 63 68 69 6c 64 20 6f | 66 20 44 61 74 65 54 69 | child o|f DateTi|
|00004be0| 6d 65 56 69 65 77 20 2a | 2f 0d 20 20 20 7b 74 65 |meView *|/. {te|
|00004bf0| 78 74 3a 20 22 54 6f 64 | 61 79 22 2c 0d 20 20 20 |xt: "Tod|ay",. |
|00004c00| 20 62 75 74 74 6f 6e 43 | 6c 69 63 6b 53 63 72 69 | buttonC|lickScri|
|00004c10| 70 74 3a 0d 20 20 20 20 | 20 20 66 75 6e 63 28 29 |pt:. | func()|
|00004c20| 0d 20 20 20 20 20 20 62 | 65 67 69 6e 0d 20 20 20 |. b|egin. |
|00004c30| 20 20 20 09 73 65 6c 65 | 63 74 65 64 44 61 74 65 | .sele|ctedDate|
|00004c40| 73 20 3a 3d 20 5b 54 69 | 6d 65 28 29 5d 3b 0d 20 |s := [Ti|me()];. |
|00004c50| 20 20 20 20 20 09 64 61 | 74 65 50 69 63 6b 65 72 | .da|tePicker|
|00004c60| 3a 52 65 66 72 65 73 68 | 28 29 3b 0d 20 20 20 20 |:Refresh|();. |
|00004c70| 20 20 65 6e 64 2c 0d 20 | 20 20 20 76 69 65 77 42 | end,. | viewB|
|00004c80| 6f 75 6e 64 73 3a 20 7b | 6c 65 66 74 3a 20 31 34 |ounds: {|left: 14|
|00004c90| 2c 20 74 6f 70 3a 20 31 | 31 38 2c 20 72 69 67 68 |, top: 1|18, righ|
|00004ca0| 74 3a 20 36 35 2c 20 62 | 6f 74 74 6f 6d 3a 20 31 |t: 65, b|ottom: 1|
|00004cb0| 33 30 7d 2c 0d 20 20 20 | 20 5f 70 72 6f 74 6f 3a |30},. | _proto:|
|00004cc0| 20 5f 75 73 65 72 70 72 | 6f 74 6f 30 30 31 0d 20 | _userpr|oto001. |
|00004cd0| 20 20 7d 3b 0d 0d 0d 0d | 65 6e 74 65 72 20 3a 3d | };....|enter :=|
|00004ce0| 20 2f 2a 20 63 68 69 6c | 64 20 6f 66 20 44 61 74 | /* chil|d of Dat|
|00004cf0| 65 54 69 6d 65 56 69 65 | 77 20 2a 2f 0d 20 20 20 |eTimeVie|w */. |
|00004d00| 7b 74 65 78 74 3a 20 22 | 53 65 74 22 2c 0d 20 20 |{text: "|Set",. |
|00004d10| 20 20 62 75 74 74 6f 6e | 43 6c 69 63 6b 53 63 72 | button|ClickScr|
|00004d20| 69 70 74 3a 0d 20 20 20 | 20 20 20 66 75 6e 63 28 |ipt:. | func(|
|00004d30| 29 0d 20 20 20 20 20 20 | 62 65 67 69 6e 0d 20 20 |). |begin. |
|00004d40| 20 20 20 20 70 72 69 6e | 74 28 73 65 6c 65 63 74 | prin|t(select|
|00004d50| 65 64 44 61 74 65 73 29 | 3b 0d 20 20 20 20 20 20 |edDates)|;. |
|00004d60| 0d 20 20 20 20 20 20 76 | 69 65 77 54 6f 53 65 74 |. v|iewToSet|
|00004d70| 3a 50 69 63 6b 65 64 44 | 61 74 65 28 73 65 6c 65 |:PickedD|ate(sele|
|00004d80| 63 74 65 64 44 61 74 65 | 73 5b 30 5d 29 3b 0d 20 |ctedDate|s[0]);. |
|00004d90| 20 20 20 20 20 0d 20 20 | 20 20 20 20 2f 2f 09 78 | . | //.x|
|00004da0| 20 3a 3d 20 73 74 72 69 | 6e 67 74 6f 64 61 74 65 | := stri|ngtodate|
|00004db0| 28 6c 6f 6e 67 64 61 74 | 65 73 74 72 28 73 65 6c |(longdat|estr(sel|
|00004dc0| 65 63 74 65 64 44 61 74 | 65 73 5b 30 5d 2c 30 29 |ectedDat|es[0],0)|
|00004dd0| 29 3b 0d 20 20 20 20 20 | 20 2f 2f 09 53 65 74 56 |);. | //.SetV|
|00004de0| 61 6c 75 65 28 76 69 65 | 77 54 6f 53 65 74 2c 20 |alue(vie|wToSet, |
|00004df0| 27 74 65 78 74 2c 20 44 | 61 74 65 4e 54 69 6d 65 |'text, D|ateNTime|
|00004e00| 28 78 29 29 3b 0d 20 20 | 20 20 20 20 09 69 66 20 |(x));. | .if |
|00004e10| 61 75 74 6f 43 6c 6f 73 | 65 20 74 68 65 6e 20 3a |autoClos|e then :|
|00004e20| 50 61 72 65 6e 74 28 29 | 3a 43 6c 6f 73 65 28 29 |Parent()|:Close()|
|00004e30| 3b 0d 20 20 20 20 20 20 | 65 6e 64 2c 0d 20 20 20 |;. |end,. |
|00004e40| 20 76 69 65 77 42 6f 75 | 6e 64 73 3a 20 7b 6c 65 | viewBou|nds: {le|
|00004e50| 66 74 3a 20 37 33 2c 20 | 74 6f 70 3a 20 31 31 38 |ft: 73, |top: 118|
|00004e60| 2c 20 72 69 67 68 74 3a | 20 31 31 32 2c 20 62 6f |, right:| 112, bo|
|00004e70| 74 74 6f 6d 3a 20 31 33 | 30 7d 2c 0d 20 20 20 20 |ttom: 13|0},. |
|00004e80| 5f 70 72 6f 74 6f 3a 20 | 5f 75 73 65 72 70 72 6f |_proto: |_userpro|
|00004e90| 74 6f 30 30 31 2c 0d 20 | 20 20 20 64 65 62 75 67 |to001,. | debug|
|00004ea0| 3a 20 22 65 6e 74 65 72 | 22 0d 20 20 20 7d 3b 0d |: "enter|". };.|
|00004eb0| 2f 2f 20 56 69 65 77 20 | 65 6e 74 65 72 20 69 73 |// View |enter is|
|00004ec0| 20 64 65 63 6c 61 72 65 | 64 20 74 6f 20 44 61 74 | declare|d to Dat|
|00004ed0| 65 54 69 6d 65 56 69 65 | 77 0d 0d 0d 0d 5f 76 69 |eTimeVie|w...._vi|
|00004ee0| 65 77 30 30 33 20 3a 3d | 20 2f 2a 20 63 68 69 6c |ew003 :=| /* chil|
|00004ef0| 64 20 6f 66 20 44 61 74 | 65 54 69 6d 65 56 69 65 |d of Dat|eTimeVie|
|00004f00| 77 20 2a 2f 20 7b 5f 70 | 72 6f 74 6f 3a 20 70 72 |w */ {_p|roto: pr|
|00004f10| 6f 74 6f 43 6c 6f 73 65 | 62 6f 78 7d 3b 0d 0d 0d |otoClose|box};...|
|00004f20| 0d 70 69 63 6b 65 72 54 | 69 74 6c 65 20 3a 3d 20 |.pickerT|itle := |
|00004f30| 2f 2a 20 63 68 69 6c 64 | 20 6f 66 20 44 61 74 65 |/* child| of Date|
|00004f40| 54 69 6d 65 56 69 65 77 | 20 2a 2f 0d 20 20 20 7b |TimeView| */. {|
|00004f50| 74 69 74 6c 65 3a 20 22 | 54 69 74 6c 65 22 2c 0d |title: "|Title",.|
|00004f60| 20 20 20 20 76 69 65 77 | 42 6f 75 6e 64 73 3a 20 | view|Bounds: |
|00004f70| 7b 6c 65 66 74 3a 20 34 | 2c 20 74 6f 70 3a 20 37 |{left: 4|, top: 7|
|00004f80| 2c 20 72 69 67 68 74 3a | 20 32 30 30 2c 20 62 6f |, right:| 200, bo|
|00004f90| 74 74 6f 6d 3a 20 32 33 | 7d 2c 0d 20 20 20 20 5f |ttom: 23|},. _|
|00004fa0| 70 72 6f 74 6f 3a 20 70 | 72 6f 74 6f 54 69 74 6c |proto: p|rotoTitl|
|00004fb0| 65 2c 0d 20 20 20 20 64 | 65 62 75 67 3a 20 22 70 |e,. d|ebug: "p|
|00004fc0| 69 63 6b 65 72 54 69 74 | 6c 65 22 0d 20 20 20 7d |ickerTit|le". }|
|00004fd0| 3b 0d 2f 2f 20 56 69 65 | 77 20 70 69 63 6b 65 72 |;.// Vie|w picker|
|00004fe0| 54 69 74 6c 65 20 69 73 | 20 64 65 63 6c 61 72 65 |Title is| declare|
|00004ff0| 64 20 74 6f 20 44 61 74 | 65 54 69 6d 65 56 69 65 |d to Dat|eTimeVie|
|00005000| 77 0d 0d 0d 0d 0d 2f 2f | 20 2d 2d 2d 2d 20 42 61 |w.....//| ---- Ba|
|00005010| 63 6b 20 69 6e 20 46 69 | 6c 65 20 74 65 73 74 2e |ck in Fi|le test.|
|00005020| 74 20 2d 2d 2d 2d 0d 64 | 61 74 65 50 69 63 6b 65 |t ----.d|atePicke|
|00005030| 72 20 3a 3d 20 2f 2a 20 | 63 68 69 6c 64 20 6f 66 |r := /* |child of|
|00005040| 20 6d 61 69 6e 20 2a 2f | 20 7b 5f 70 72 6f 74 6f | main */| {_proto|
|00005050| 3a 20 44 61 74 65 54 69 | 6d 65 56 69 65 77 2c 20 |: DateTi|meView, |
|00005060| 64 65 62 75 67 3a 20 22 | 64 61 74 65 50 69 63 6b |debug: "|datePick|
|00005070| 65 72 22 7d 3b 0d 2f 2f | 20 56 69 65 77 20 64 61 |er"};.//| View da|
|00005080| 74 65 50 69 63 6b 65 72 | 20 69 73 20 64 65 63 6c |tePicker| is decl|
|00005090| 61 72 65 64 20 74 6f 20 | 6d 61 69 6e 0d 0d 0d 0d |ared to |main....|
|000050a0| 61 75 74 6f 43 6c 6f 73 | 65 20 73 65 74 74 65 72 |autoClos|e setter|
|000050b0| 20 3a 3d 20 2f 2a 20 63 | 68 69 6c 64 20 6f 66 20 | := /* c|hild of |
|000050c0| 6d 61 69 6e 20 2a 2f 0d | 20 20 20 7b 0d 20 20 20 |main */.| {. |
|000050d0| 20 6c 61 62 65 6c 43 6f | 6d 6d 61 6e 64 73 3a 0d | labelCo|mmands:.|
|000050e0| 20 20 20 20 20 20 5b 22 | 41 75 74 6f 20 43 6c 6f | ["|Auto Clo|
|000050f0| 73 65 20 44 61 74 65 20 | 45 64 69 74 6f 72 73 20 |se Date |Editors |
|00005100| 6f 6e 20 53 65 74 22 2c | 22 4d 61 6e 75 61 6c 6c |on Set",|"Manuall|
|00005110| 79 20 43 6c 6f 73 65 20 | 44 61 74 65 20 45 64 69 |y Close |Date Edi|
|00005120| 74 6f 72 20 77 69 74 68 | 20 78 22 5d 2c 0d 20 20 |tor with| x"],. |
|00005130| 20 20 76 69 65 77 42 6f | 75 6e 64 73 3a 20 7b 6c | viewBo|unds: {l|
|00005140| 65 66 74 3a 20 32 30 2c | 20 74 6f 70 3a 20 32 37 |eft: 20,| top: 27|
|00005150| 34 2c 20 72 69 67 68 74 | 3a 20 32 32 30 2c 20 62 |4, right|: 220, b|
|00005160| 6f 74 74 6f 6d 3a 20 32 | 38 37 7d 2c 0d 20 20 20 |ottom: 2|87},. |
|00005170| 20 6c 61 62 65 6c 41 63 | 74 69 6f 6e 53 63 72 69 | labelAc|tionScri|
|00005180| 70 74 3a 0d 20 20 20 20 | 20 20 66 75 6e 63 28 63 |pt:. | func(c|
|00005190| 6d 64 29 0d 20 20 20 20 | 20 20 62 65 67 69 6e 0d |md). | begin.|
|000051a0| 20 20 20 20 20 20 09 69 | 66 20 63 6d 64 20 3d 20 | .i|f cmd = |
|000051b0| 30 20 74 68 65 6e 20 0d | 20 20 20 20 20 20 09 09 |0 then .| ..|
|000051c0| 64 61 74 65 54 69 6d 65 | 50 69 63 6b 65 72 2e 41 |dateTime|Picker.A|
|000051d0| 75 74 6f 43 6c 6f 73 65 | 20 3a 3d 20 64 61 74 65 |utoClose| := date|
|000051e0| 50 69 63 6b 65 72 2e 41 | 75 74 6f 43 6c 6f 73 65 |Picker.A|utoClose|
|000051f0| 20 3a 3d 20 54 72 75 65 | 3b 0d 20 20 20 20 20 20 | := True|;. |
|00005200| 09 65 6c 73 65 0d 20 20 | 20 20 20 20 09 09 64 61 |.else. | ..da|
|00005210| 74 65 54 69 6d 65 50 69 | 63 6b 65 72 2e 41 75 74 |teTimePi|cker.Aut|
|00005220| 6f 43 6c 6f 73 65 20 3a | 3d 20 64 61 74 65 50 69 |oClose :|= datePi|
|00005230| 63 6b 65 72 2e 41 75 74 | 6f 43 6c 6f 73 65 20 3a |cker.Aut|oClose :|
|00005240| 3d 20 6e 69 6c 3b 0d 20 | 20 20 20 20 20 65 6e 64 |= nil;. | end|
|00005250| 2c 0d 20 20 20 20 5f 70 | 72 6f 74 6f 3a 20 70 72 |,. _p|roto: pr|
|00005260| 6f 74 6f 4c 61 62 65 6c | 50 69 63 6b 65 72 2c 0d |otoLabel|Picker,.|
|00005270| 20 20 20 20 64 65 62 75 | 67 3a 20 22 61 75 74 6f | debu|g: "auto|
|00005280| 43 6c 6f 73 65 20 73 65 | 74 74 65 72 22 0d 20 20 |Close se|tter". |
|00005290| 20 7d 3b 0d 0d 0d 0d 0d | 0d 0d 0d 2f 2f 20 2d 2d | };.....|...// --|
|000052a0| 2d 2d 20 42 65 67 69 6e | 6e 69 6e 67 20 6f 66 20 |-- Begin|ning of |
|000052b0| 73 65 63 74 69 6f 6e 20 | 66 6f 72 20 6e 6f 6e 20 |section |for non |
|000052c0| 75 73 65 64 20 4c 61 79 | 6f 75 74 20 66 69 6c 65 |used Lay|out file|
|000052d0| 73 20 2d 2d 2d 2d 0d 0d | 2f 2f 20 45 6e 64 20 6f |s ----..|// End o|
|000052e0| 66 20 6f 75 74 70 75 74 | 00 00 00 00 00 00 00 00 |f output|........|
|000052f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005300| 00 00 01 00 00 00 01 00 | 00 00 00 00 00 00 00 1e |........|........|
|00005310| 6f 72 6d 61 74 2c 47 65 | 74 44 61 74 65 53 74 72 |ormat,Ge|tDateStr|
|00005320| 69 6e 67 53 70 65 63 28 | 5b 0d 09 09 09 09 5b 6b |ingSpec(|[.....[k|
|00005330| 0f 64 61 74 65 54 69 6d | 65 2e b9 2e 74 65 78 74 |.dateTim|e...text|
|00005340| 02 00 02 00 54 45 58 54 | 4d 50 53 20 01 00 00 00 |....TEXT|MPS ....|
|00005350| 02 00 54 45 58 54 4d 50 | 53 20 01 00 00 00 01 00 |..TEXTMP|S ......|
|00005360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005370| 00 00 aa ae 27 38 00 00 | 52 68 00 00 01 1e 74 44 |....'8..|Rh....tD|
|00005380| 61 79 2c 20 6b 46 6f 72 | 6d 61 74 4c 6f 6e 67 5d |ay, kFor|matLong]|
|00005390| 5d 29 29 3b 0d 0d 2f 2f | 20 2d 2d 2d 2d 20 45 6e |]));..//| ---- En|
|000053a0| 64 20 50 72 6f 6a 65 63 | 74 20 44 61 74 61 20 2d |d Projec|t Data -|
|000053b0| 2d 2d 2d 0d 0d 0d 2f 2f | 20 2d 2d 2d 2d 20 46 69 |---...//| ---- Fi|
|000053c0| 6c 65 20 74 65 73 74 2e | 74 20 2d 2d 2d 2d 0d 6d |le test.|t ----.m|
|000053d0| 61 69 6e 20 3a 3d 0d 20 | 20 20 7b 74 69 74 6c 65 |ain :=. | {title|
|000053e0| 3a 20 22 44 61 74 65 20 | 50 72 6f 74 6f 73 20 53 |: "Date |Protos S|
|000053f0| 61 6d 70 6c 65 20 32 22 | 2c 0d 20 20 20 20 76 69 |ample 2"|,. vi|
|00005400| 00 00 01 00 00 00 01 00 | 00 00 00 00 00 00 00 1e |........|........|
|00005410| 00 00 00 00 00 00 00 00 | 00 1c 00 1e ff ff 00 00 |........|........|
|00005420| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005430| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005440| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005450| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005460| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005470| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+